Source: libselinux
Version: 2.1.0-1
Severity: wishlist
User: crossbu...@debian.org
Usertags: cross

There are a relatively large number of packages which depend and/or
build-depend on libselinux, including dpkg, coreutils, etc.

Unfortunately, when trying to bootstrap a new architecture, this means
that libselinux is one of a small set of packages which needs to be
cross-compiled for the target when very little is available.

The problems come from the python and ruby bindings, which are not
easily disabled in the Debian packaging, yet are undesired when trying
to do such an architecture bootstrap.

A lot of other packages (especially those using debhelper) can be
patched with a few ./configure or make arguments and fiddling with the
DH_OPTIONS variable to add "-Nlibfoo-python -Nlibfoo-ruby", but
unfortunately the libselinux packaging does something terribly
complicated in debian/common/pkgvars.mk with these gems:

DEB_PACKAGES := $(shell perl -e '                                               
     \
                  $$/="";                                                       
     \
                  while(<>){                                                    
     \
                     $$p=$$1 if m/^Package:\s*(\S+)/;                           
     \
                     die "duplicate package $$p" if $$seen{$$p};                
     \
                     $$seen{$$p}++; print "$$p " if $$p;                        
     \
                  }' debian/control )

DEB_INDEP_PACKAGES := $(shell perl -e '                                         
     \
                         $$/="";                                                
     \
                         while(<>){                                             
     \
                            $$p=$$1 if m/^Package:\s*(\S+)/;                    
     \
                            die "duplicate package $$p" if $$seen{$$p};         
     \
                            $$seen{$$p}++;                                      
     \
                            $$a=$$1 if m/^Architecture:\s*(\S+)/m;              
     \
                            next unless ($$a eq "all");                         
     \
                            print "$$p " if $$p;                                
     \
                         }' debian/control )

DEB_ARCH_PACKAGES := $(shell perl -e '                                          
     \
                         $$/="";                                                
     \
                         while(<>){                                             
     \
                            $$p=$$1 if m/^Package:\s*(\S+)/;                    
     \
                            die "duplicate package $$p" if $$seen{$$p};         
     \
                            $$seen{$$p}++;                                      
     \
                            $$c="";                                             
     \
                            if (/^Architecture:\s*(.*?)\s*$$/sm) {              
     \
                              @a = split /\s+/, $$1 };                          
     \
                              for my $$b (@a) {                                 
     \
                                next unless ($$b eq "$(DEB_HOST_ARCH)" ||       
     \
                                             $$b eq "any");                     
     \
                                $$c="$$p";                                      
     \
                            }                                                   
     \
                            print "$$c " if $$c;                                
     \
                         }' debian/control )

As a tangentially related question, would it be reasonably practical to
convert libselinux over to a more-conventional debhelper-based build?

If not, please consider adding a conditional based on the "$DEB_STAGE"
environment variable; if it is set to "stage1" the python and ruby
bindings should be disabled to allow all the other packages that depend
on libselinux to be bootstrapped.

Cheers,
Kyle Moffett

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (700, 'testing'), (700, 'stable'), (600, 'unstable'), (500, 
'stable-updates'), (500, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to