[Bug 1979128] Re: [SRU] ruby-sdbm should be backported to jammy

Mitsuya Shibata 1979128 at bugs.launchpad.net
Fri Jan 6 14:16:07 UTC 2023


Thanks Lucas and Andreas. I verified new bsfilter package.

# install bsfilter

root at sdbm:~# cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list                
# Enable Ubuntu proposed archive                                                                       
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe  
EOF                                                                                                    
root at sdbm:~# cat <<EOF >/etc/apt/preferences.d/proposed-updates
# Configure apt to allow selective installs of packages from proposed                                  
Package: *                                                                                             
Pin: release a=$(lsb_release -cs)-proposed                                                             
Pin-Priority: 400                                                                                      
EOF                                                                                                                                                                                                            
root at sdbm:~# apt update
root at sdbm:~# apt policy bsfilter                                                                                                                                                                               
bsfilter:                                                                                                                                                                                                      
  Installed: (none)                                                                                    
  Candidate: 1:1.0.19-2.1
  Version table:
     1:1.0.19-2.1ubuntu0.1 400
        400 http://archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages
     1:1.0.19-2.1 500
        500 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
root at sdbm:~# apt install -t jammy-proposed bsfilter
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fonts-lato javascript-common libjs-jquery libruby3.0 rake ruby ruby-net-telnet ruby-rubygems ruby-sdbm ruby-webrick ruby-xmlrpc ruby3.0 rubygems-integration unzip zip
Suggested packages:
  ruby-mecab ruby-qdbm apache2 | lighttpd | httpd ri ruby-dev bundler
The following NEW packages will be installed:
  bsfilter fonts-lato javascript-common libjs-jquery libruby3.0 rake ruby ruby-net-telnet ruby-rubygems ruby-sdbm ruby-webrick ruby-xmlrpc ruby3.0 rubygems-integration unzip zip
0 upgraded, 16 newly installed, 0 to remove and 31 not upgraded.
Need to get 9008 kB of archives.
After this operation, 39.0 MB of additional disk space will be used.
(snip)
  => install ruby-sdbm too.

# test bsfilter
root at sdbm:~# touch foo
root at sdbm:~# bsfilter --sub-clean --add-spam --insert-flag --insert-probability --update foo
root at sdbm:~# echo $?
0

** Tags removed: verification-needed verification-needed-jammy
** Tags added: verification-done verification-done-jammy

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1979128

Title:
  [SRU] ruby-sdbm should be backported to jammy

Status in bsfilter package in Ubuntu:
  Fix Released
Status in ruby-sdbm package in Ubuntu:
  Fix Released
Status in bsfilter source package in Jammy:
  Fix Committed
Status in ruby-sdbm source package in Jammy:
  Fix Released

Bug description:
  [Impact]

  In jammy, the bsfilter package assumes that ruby has the sdbm library
  built in. However, the sdbm library was removed in Ruby 3.0 and became
  a separate package. Therefore, the learning function of bsfilter does
  not work anymore.

  Therefore, we will add the ruby-sdbm package to bsfilter's Depends
  field.

  [Test Plan]

  $ lxc launch ubuntu-daily:jammy bsfilter-test
  $ lxc shell bsfilter-test
  # apt install -y bsfilter
  # touch foo 
  # bsfilter --sub-clean --add-spam --insert-flag --insert-probability --update foo
  # echo $?
  0

  no display load error for "require" instruction, and bsfilter command
  should succeed.

  [Where problems could occur]

  The bsfilter command always fails if ruby-sdbm is not installed,
  because it tries to load the sdbm library by default if the DB option
  is unspecified. Therefore, I consider that there is no risk of
  regression.

  ---

  Following for SRU of ruby-sdbm

  [Impact]

  In Ruby 3.0, sdbm has been removed from the standard library[1].
  However, some packages, such as the bsfilter package, will fail at
  startup without the sdbm library, LP: #1972040 .

  The ruby-sdbm package does not exist in Jammy, only in Kinetic.
  Therefore, backporting ruby-sdbm from kinetic to jammy and relying on
  ruby-sdbm on the bsfilter side seems to solve the problem.

  [1] https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/

  [Test Plan]

  $ lxc launch ubuntu-daily:jammy ruby-sdbm-test
  $ lxc shell ruby-sdbm-test
  # apt install -y ruby-sdbm
  # ruby -e "require 'sdbm'; SDBM.open 'my_database' do |db| db.update('foo' => 'bar') end"

  The command above will create 2 files: my_database.dir and
  my_database.pag. No exception is expected.

  [Where problems could occur]

  The ruby-sdbm package does not exist in Jammy, I do not believe that
  any regression will occur.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bsfilter/+bug/1979128/+subscriptions




More information about the Ubuntu-sponsors mailing list