From e3acf4eb64f5c5321ed4305c18b452a753cb83d3 Mon Sep 17 00:00:00 2001
From: Ark74 <ark@switnet.org>
Date: Tue, 1 Nov 2022 09:00:54 -0600
Subject: [PATCH] debian-installer-repository: add secondary packages for d-i

---
 helpers/DATA/udeb-repo/README.mkd             | 29 +++++++++++++++++
 .../udeb-repo/aramo/aramo-udeb-rebuild-list   | 11 +++++++
 helpers/make-alsa-lib                         | 32 +++++++++++++++++++
 helpers/make-expat                            | 32 +++++++++++++++++++
 helpers/make-libcap2                          | 32 +++++++++++++++++++
 helpers/make-libtextwrap                      | 32 +++++++++++++++++++
 helpers/make-libxcrypt                        | 32 +++++++++++++++++++
 helpers/make-ncurses                          | 32 +++++++++++++++++++
 helpers/make-openssl                          | 32 +++++++++++++++++++
 helpers/make-pcre2                            | 32 +++++++++++++++++++
 helpers/make-slang2                           | 32 +++++++++++++++++++
 helpers/make-zlib                             | 32 +++++++++++++++++++
 12 files changed, 360 insertions(+)
 create mode 100644 helpers/make-alsa-lib
 create mode 100644 helpers/make-expat
 create mode 100644 helpers/make-libcap2
 create mode 100644 helpers/make-libtextwrap
 create mode 100644 helpers/make-libxcrypt
 create mode 100644 helpers/make-ncurses
 create mode 100644 helpers/make-openssl
 create mode 100644 helpers/make-pcre2
 create mode 100644 helpers/make-slang2
 create mode 100644 helpers/make-zlib

diff --git a/helpers/DATA/udeb-repo/README.mkd b/helpers/DATA/udeb-repo/README.mkd
index cc2bd3b8..91e7cb82 100644
--- a/helpers/DATA/udeb-repo/README.mkd
+++ b/helpers/DATA/udeb-repo/README.mkd
@@ -97,6 +97,35 @@ SYSLOG_NETINST="path-to/syslog_netinstall"
 
 Just like before, this will provide a list of source packages necessary to build for our udeb repository, be ware that some helpers for these source packages might already exist, errors finding the source package mean source packages are required from debian.
 
+### 3) Secondary udeb dependencies
+
+This final set of packages derive from dependencies of the prior ones (1,2), this list is obtained from the sbuild log, it can be fetched by parsing the build log, for this example the `amd64` arch is used.
+On the build debian-directory we parse the failing build log, _*amd64.build_ for this example.
+
+Getting the udeb list
+```
+$ ls  *amd64.build
+debian-installer_20210731+deb11u5+11.0trisquel9_amd64.build
+
+$ sed -n '/The following packages have unmet dependencies:/,/Unable to correct problems, you have held broken packages/p' *amd64.build| \
+  awk -F 'Depends:' '{print$2}'| \
+  awk '{print$1}'|awk 'NF'| \
+  awk '!seen[$0]++'| \
+  sort
+```
+
+Getting the source packages names for the helper packages,
+```
+$ apt-cache madison $(sed -n '/The following packages have unmet dependencies:/,/Unable to correct problems, you have held broken packages/p' *amd64.build| \
+  awk -F 'Depends:' '{print$2}'| \
+  awk '{print$1}'|awk 'NF'| \
+  awk '!seen[$0]++'| \
+  sort)|grep aramo| \
+  awk '{print$1}'| \
+  awk '!seen[$0]++'| \
+  sort
+```
+
 ## Set upstream source
 
 Once finding source packages required from debian as several debian-installer packages has been droped from upstream Ubuntu, targeting the use of debian **stable** as source repository.
diff --git a/helpers/DATA/udeb-repo/aramo/aramo-udeb-rebuild-list b/helpers/DATA/udeb-repo/aramo/aramo-udeb-rebuild-list
index 6fd1c2ed..192ce2ad 100644
--- a/helpers/DATA/udeb-repo/aramo/aramo-udeb-rebuild-list
+++ b/helpers/DATA/udeb-repo/aramo/aramo-udeb-rebuild-list
@@ -39,3 +39,14 @@ util-linux
 wget
 wireless-regdb
 xfsprogs
+#secondary dependencies
+alsa-lib
+expat
+libcap2
+libtextwrap
+libxcrypt
+ncurses
+openssl
+pcre2
+slang2
+zlib
diff --git a/helpers/make-alsa-lib b/helpers/make-alsa-lib
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-alsa-lib
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-expat b/helpers/make-expat
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-expat
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-libcap2 b/helpers/make-libcap2
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-libcap2
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-libtextwrap b/helpers/make-libtextwrap
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-libtextwrap
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-libxcrypt b/helpers/make-libxcrypt
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-libxcrypt
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-ncurses b/helpers/make-ncurses
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-ncurses
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-openssl b/helpers/make-openssl
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-openssl
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-pcre2 b/helpers/make-pcre2
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-pcre2
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-slang2 b/helpers/make-slang2
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-slang2
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
diff --git a/helpers/make-zlib b/helpers/make-zlib
new file mode 100644
index 00000000..ee74ecb2
--- /dev/null
+++ b/helpers/make-zlib
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+#    Copyright (C) 2022  Luis Guzmán <ark@switnet.org>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+#
+
+##
+# This helper is part of a series of packages that are now droppped on upstream
+# Ubuntu, therefore in order to build a working debian-installer we now fetch
+# such packages from Debian in order to build the required udeb packages.
+##
+
+VERSION=0
+NETINST=true
+. ./config
+
+
+changelog "Fetch and build as udeb dependency for debian-installer."
+compile
-- 
GitLab