[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1002508: readline: Please provide a udeb



Source: readline
Version: 8.1-2
Severity: normal
Tags: d-i a11y patch

Hello,

So as to provide better support for the text installer for speakup-based
accessibility, we need libreadline in d-i. Here is a patch to add the
udeb build, could you apply it?

Thanks,
Samuel

-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-2-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- 
Samuel
mdiym42: note to self
mdiym42: make sure your cat is not sleeping in the bass drum before you start playing them
--- debian/control.original	2021-12-23 14:14:29.494489058 +0100
+++ debian/control	2021-12-23 15:03:01.596025090 +0100
@@ -23,6 +23,21 @@
  The GNU history library provides a consistent user interface for
  recalling lines of previously typed input.
 
+Package: libreadline8-udeb
+Architecture: any
+Depends: readline-common-udeb, ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Package-Type: udeb
+Build-Profiles: <!noudeb>
+Section: debian-installer
+Description: GNU readline and history libraries, run-time libraries (d-i)
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+
 Package: lib64readline8
 Architecture: i386 powerpc s390 sparc
 Depends: readline-common, ${shlibs:Depends}, ${misc:Depends}
@@ -47,6 +62,21 @@
  The GNU readline library aids in the consistency of user interface
  across discrete programs that need to provide a command line
  interface.
+ .
+ The GNU history library provides a consistent user interface for
+ recalling lines of previously typed input.
+
+Package: readline-common-udeb
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Package-Type: udeb
+Build-Profiles: <!noudeb>
+Section: debian-installer
+Description: GNU readline and history libraries, common files (d-i)
+ The GNU readline library aids in the consistency of user interface
+ across discrete programs that need to provide a command line
+ interface.
  .
  The GNU history library provides a consistent user interface for
  recalling lines of previously typed input.
--- debian/rules.original	2021-12-23 14:14:33.018490312 +0100
+++ debian/rules	2021-12-23 15:08:20.460279596 +0100
@@ -17,6 +17,10 @@
 CROSS=gcc
 endif
 
+ifeq (,$(filter noudeb,$(DEB_BUILD_PROFILES)))
+  buildudeb = yes
+endif
+
 ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/i386/powerpc/sparc/s390/))
   build64 = yes
   CC64 = $(CROSS) -m64
@@ -69,9 +73,11 @@
 SHELL	= bash
 
 p_rl	= libreadline$(soversion)
+p_rlu	= libreadline$(soversion)-udeb
 p_rl32	= lib32readline$(soversion)
 p_rl64	= lib64readline$(soversion)
 p_comm	= readline-common
+p_commu	= readline-common-udeb
 p_rld	= libreadline-dev
 p_rld32	= lib32readline-dev
 p_rld64	= lib64readline-dev
@@ -79,12 +85,15 @@
 p_rlfe	= rlfe
 
 d	= debian/tmp
+du	= debian/tmp-udeb
 d32	= debian/tmp32
 d64	= debian/tmp64
 d_rl	= debian/$(p_rl)
+d_rlu	= debian/$(p_rlu)
 d_rl32	= debian/$(p_rl32)
 d_rl64	= debian/$(p_rl64)
 d_comm	= debian/$(p_comm)
+d_commu	= debian/$(p_commu)
 d_rld	= debian/$(p_rld)
 d_rld32	= debian/$(p_rld32)
 d_rld64	= debian/$(p_rld64)
@@ -93,6 +102,7 @@
 
 srcdir		= $(CURDIR)
 builddir	= $(CURDIR)/build
+builddiru	= $(CURDIR)/buildudeb
 builddir32	= $(CURDIR)/build32
 builddir64	= $(CURDIR)/build64
 
@@ -111,6 +121,16 @@
 		--host=$(DEB_HOST_GNU_TYPE) \
 		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
 
+ifneq ($(buildudeb),)
+	rm -rf $(builddiru)
+	mkdir $(builddiru)
+	cd $(builddiru) && \
+	  CFLAGS="$(CFLAGS) -Os" CPPFLAGS="$(CPPFLAGS)" $(srcdir)/configure \
+		--prefix=/usr\
+		--host=$(DEB_HOST_GNU_TYPE) \
+		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
+endif
+
 ifneq ($(build32),)
 	rm -rf $(builddir32)
 	mkdir $(builddir32)
@@ -141,6 +161,14 @@
 	    SHOBJ_LDFLAGS='$(LDFLAGS) -shared' \
 	    SHLIB_LIBS="-ltinfo"
 
+ifneq ($(buildudeb),)
+	$(MAKE) -C $(builddiru) \
+	    CFLAGS="$(CFLAGS) -Os" CPPFLAGS="$(CPPFLAGS)" \
+	    SHOBJ_CFLAGS="-fPIC -D_REENTRANT" \
+	    SHOBJ_LDFLAGS='$(LDFLAGS) -shared' \
+	    SHLIB_LIBS="-ltinfo"
+endif
+
 ifneq ($(build32),)
 	$(MAKE) -C $(builddir32) \
 	    CC="$(CC32)" \
@@ -277,6 +305,34 @@
 	cp -p debian/rlfe.1 $(d_rlfe)/usr/share/man/man1/.
 endif
 
+ifneq ($(buildudeb),)
+	rm -rf $(du)
+	mkdir -p $(du)/usr/bin
+	mkdir -p $(du)/usr/lib/pkgconfig
+	$(MAKE) -C $(builddiru) install \
+	    CC="$(CCu)" \
+	    CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) -D_REENTRANT" \
+	    SHOBJ_LDFLAGS='-shared $(LDFLAGS)' \
+	    SHLIB_XLDFLAGS='-Wl,-soname,`echo $$@ | sed s/\\..$$$$//`' \
+	    SHLIB_LIBS=-ltinfo \
+	    DESTDIR=$(CURDIR)/$(du) \
+	    mandir=/usr/share/man \
+	    infodir=/usr/share/info
+
+	dh_installdirs -p$(p_rlu) \
+	    lib/$(DEB_HOST_MULTIARCH)
+	cp -p $(du)/usr/lib/$(DEB_HOST_MULTIARCH)/lib{history,readline}.so.$(libversion) \
+		$(d_rlu)/lib/$(DEB_HOST_MULTIARCH)/
+	ln -s libhistory.so.$(libversion) \
+		$(d_rlu)/lib/$(DEB_HOST_MULTIARCH)/libhistory.so.$(soversion)
+	ln -s libreadline.so.$(libversion) \
+		$(d_rlu)/lib/$(DEB_HOST_MULTIARCH)/libreadline.so.$(soversion)
+
+	dh_installdirs -p$(p_commu) \
+		usr/share/readline
+	install -m 644 debian/inputrc $(d_commu)/usr/share/readline/
+endif
+
 ifneq ($(build32),)
 	rm -rf $(d32)
 	mkdir -p $(d32)/usr/bin
@@ -402,11 +458,20 @@
 	dh_strip -p$(p_rl) -p$(p_rld) -p$(p_rlfe)
 	dh_compress -p$(p_rl) -p$(p_rld) -p$(p_rlfe) \
 		-X.c -XMakefile
-	dh_makeshlibs -p$(p_rl)
+	dh_makeshlibs -p$(p_rl) --add-udeb=$(p_rlu)
 	cp -p debian/libreadline.shlibs debian/shlibs.local
 	dh_shlibdeps -p$(p_rl) -p$(p_rld) -p$(p_rlfe) \
 		 -L $(p_rl) -l $(d_rl)/lib
 
+ifneq ($(buildudeb),)
+	dh_compress -p$(p_rlu)
+	dh_fixperms -p$(p_rlu)
+	dh_strip -p$(p_rlu)
+	dh_makeshlibs -p$(p_rlu)
+	-dh_shlibdeps -p$(p_rlu) \
+		 -L $(p_rlu) -l $(d_rlu)/lib
+endif
+
 ifneq ($(build32),)
 	-ls -l $(d_rld)/usr/share/doc/$(p_rl)
 	dh_installdocs -p$(p_rl32) \

Reply to: