Hi,

On Mon, Jun 14, 2021 at 04:47:54PM +0200, Alexander Dahl wrote:
> upstream released 2.4.7 in 2014 and 2.4.9 few months ago.  They use
> handcrafted 'configure' and 'Makefile', which makes cross-build and
> updating the package somewhat difficult.  For the new release upstream
> tried to improve cross-compile support (and continues to do so in git
> master branch).
> 
> This single patch series is RFC or WIP, because of several things:
> 
> - Importing debian patches was done manually, so the diff is probably
>   more noisy than necessary. Someone in IRC said there's a script for
>   that, but could not find it.

That's because it's not public yet. It's just something I hacked to
simplify this. I'll attach it to this mail. I should probably add it to
ptxdist, but it need some more polishing for that.

It doesn't do all the work for you. It just generates better formated
patches and has a blacklist for each package so we can avoid documentation
or debian specific patches more easily.

> - CFLAGS are not passed, and I don't know how to do that.

Maybe PPP_CFLAGS is what you need?

https://www.ptxdist.org/doc/ref_make_variables.html?highlight=_cflags#build-environment-for-all-stages

Michael

> - Build with platform-v7a was successful here so far, no runtime tests
>   yet, however.
> 
> I'd appreciate any help on this topic.  I'm investigating a strange LTE
> modem issue and want to have all components on latest release before
> digging in deeper.  I already prepared libqmi, modemmanager, and
> networkmanager.  Will send that in a separate patch series soon.
> 
> Greets
> Alex
> 
> Alexander Dahl (1):
>   ppp: version bump 2.4.7 -> 2.4.9
> 
>  ...001-abort-on-errors-in-subdir-builds.patch |   48 -
>  ...002-scripts-Avoid-killing-wrong-pppd.patch |   29 -
>  ...tension-when-displaying-bytes-in-oct.patch |   30 -
>  ...se-error-message-on-PPPoE-disconnect.patch |   33 -
>  .../0005-Send-PADT-on-PPPoE-disconnect.patch  |   36 -
>  ...nt-buffer-overrun-on-remote-router-n.patch |   30 -
>  .../0007-pppd-Fix-ccp_options.mppe-type.patch |   30 -
>  ...en-calculated-size-if-both-deflate_c.patch |   33 -
>  ...in-comment.-Diff-from-Yuuichi-Someya.patch |   24 -
>  ...ount-only-relevant-lines-from-syslog.patch |   24 -
>  ...-include-from-sys-errno.h-to-errno.h.patch |   33 -
>  ...low-use-of-arbitrary-interface-names.patch |  214 --
>  ...Remove-unused-declaration-of-ttyname.patch |   25 -
>  ...or-implementation-in-pppoe-discovery.patch |   52 -
>  ...clude-netinet-in.h-before-linux-in.h.patch |   49 -
>  patches/ppp-2.4.7/0016-adaptive_echos.patch   |   72 -
>  .../ppp-2.4.7/0017-Makefiles-cleanup.patch    |  296 --
>  ...does-not-properly-close-dev-ppp-on-p.patch |   44 -
>  ...inkpidfile-is-not-created-upon-detac.patch |   48 -
>  ...smetic-cleanup-of-the-pppoatm-plugin.patch |   90 -
>  patches/ppp-2.4.7/0023-pppoe_noads.patch      |   25 -
>  ...4-make-_PATH_CONNERRS-world-readable.patch |   27 -
>  .../0025-Correct-unkown-unknown-typo.patch    |   46 -
>  .../0026-pppoe-custom-host-uniq-tag.patch     |  302 --
>  .../0027-Add-replacedefaultroute-option.patch |  324 --
>  ...-for-the-Framed-MTU-Radius-attribute.patch |   42 -
>  patches/ppp-2.4.7/0030-018_ip-up_option.patch |  106 -
>  .../0031-ppp-2.4.2-stripMSdomain.patch        |   47 -
>  ...export-CALL_FILE-to-the-link-scripts.patch |   38 -
>  .../ppp-2.4.7/0033-ipv6-accept-remote.patch   |   73 -
>  ...buffer-overflow-in-clientid.c-rc_map.patch |   43 -
>  ...0037-Fix-buffer-overflow-in-rc_mksid.patch |   36 -
>  ...P-TLS-authentication-support-for-PPP.patch | 3383 -----------------
>  ...-for-the-DES-instead-of-the-libcrypt.patch |  115 -
>  patches/ppp-2.4.7/series                      |   46 -
>  ...igure-Allow-commas-in-the-CFLAGS-220.patch |   28 +
>  ...tion-with-older-glibc-or-kernel-head.patch |   55 +
>  patches/ppp-2.4.9/0100-chat_man.patch         |   31 +
>  .../0101-pppdump_use_zlib.patch}              |   26 +-
>  .../0102-pppoatm_resolver_light.patch}        |   22 +-
>  patches/ppp-2.4.9/0103-pppoe_noads.patch      |   21 +
>  .../0104-011_scripts_redialer.diff.patch      |  162 +
>  .../0105-ppp-2.3.11-oedod.dif.patch}          |   62 +-
>  .../0106-010_scripts_README.diff.patch        |   30 +
>  patches/ppp-2.4.9/0107-no_crypt_hack.patch    |   62 +
>  .../0108-resolv.conf_no_log.patch}            |   11 +-
>  .../0109-zzz_config.patch}                    |   52 +-
>  patches/ppp-2.4.9/0110-pppd-soname-hack.patch |   31 +
>  ...111-replace-vendored-hash-functions.patch} |  217 +-
>  ...00-pppd-make-makefile-sysroot-aware.patch} |   34 +-
>  ...the-self-made-configure-cross-aware.patch} |   10 +-
>  patches/ppp-2.4.9/series                      |   22 +
>  rules/ppp.make                                |    6 +-
>  53 files changed, 638 insertions(+), 6137 deletions(-)
>  delete mode 100644 
> patches/ppp-2.4.7/0001-abort-on-errors-in-subdir-builds.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0002-scripts-Avoid-killing-wrong-pppd.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0003-pppd-Fix-sign-extension-when-displaying-bytes-in-oct.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0004-Suppress-false-error-message-on-PPPoE-disconnect.patch
>  delete mode 100644 patches/ppp-2.4.7/0005-Send-PADT-on-PPPoE-disconnect.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0006-pppd-ipxcp-Prevent-buffer-overrun-on-remote-router-n.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0007-pppd-Fix-ccp_options.mppe-type.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0008-pppd-Fix-ccp_cilen-calculated-size-if-both-deflate_c.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0009-Fix-a-typo-in-comment.-Diff-from-Yuuichi-Someya.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0010-plog-count-only-relevant-lines-from-syslog.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0011-Change-include-from-sys-errno.h-to-errno.h.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0012-pppd-allow-use-of-arbitrary-interface-names.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0013-pppd-Remove-unused-declaration-of-ttyname.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0014-pppd-Provide-error-implementation-in-pppoe-discovery.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0015-pppoe-include-netinet-in.h-before-linux-in.h.patch
>  delete mode 100644 patches/ppp-2.4.7/0016-adaptive_echos.patch
>  delete mode 100644 patches/ppp-2.4.7/0017-Makefiles-cleanup.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0018-Bug-306261-pppd-does-not-properly-close-dev-ppp-on-p.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0019-Bug-284382-ppp-linkpidfile-is-not-created-upon-detac.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0022-cosmetic-cleanup-of-the-pppoatm-plugin.patch
>  delete mode 100644 patches/ppp-2.4.7/0023-pppoe_noads.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0024-make-_PATH_CONNERRS-world-readable.patch
>  delete mode 100644 patches/ppp-2.4.7/0025-Correct-unkown-unknown-typo.patch
>  delete mode 100644 patches/ppp-2.4.7/0026-pppoe-custom-host-uniq-tag.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0027-Add-replacedefaultroute-option.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0029-add-support-for-the-Framed-MTU-Radius-attribute.patch
>  delete mode 100644 patches/ppp-2.4.7/0030-018_ip-up_option.patch
>  delete mode 100644 patches/ppp-2.4.7/0031-ppp-2.4.2-stripMSdomain.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0032-export-CALL_FILE-to-the-link-scripts.patch
>  delete mode 100644 patches/ppp-2.4.7/0033-ipv6-accept-remote.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0034-fix-a-potential-buffer-overflow-in-clientid.c-rc_map.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0037-Fix-buffer-overflow-in-rc_mksid.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0038-EAP-TLS-authentication-support-for-PPP.patch
>  delete mode 100644 
> patches/ppp-2.4.7/0040-pppd-Use-openssl-for-the-DES-instead-of-the-libcrypt.patch
>  delete mode 100644 patches/ppp-2.4.7/series
>  create mode 100644 
> patches/ppp-2.4.9/0001-configure-Allow-commas-in-the-CFLAGS-220.patch
>  create mode 100644 
> patches/ppp-2.4.9/0002-pppd-Fix-compilation-with-older-glibc-or-kernel-head.patch
>  create mode 100644 patches/ppp-2.4.9/0100-chat_man.patch
>  rename 
> patches/{ppp-2.4.7/0020-support-building-pppdump-with-the-system-zlib.patch 
> => ppp-2.4.9/0101-pppdump_use_zlib.patch} (62%)
>  rename 
> patches/{ppp-2.4.7/0021-disable-unneeded-code-in-the-pppoatm-plugin.patch => 
> ppp-2.4.9/0102-pppoatm_resolver_light.patch} (87%)
>  create mode 100644 patches/ppp-2.4.9/0103-pppoe_noads.patch
>  create mode 100644 patches/ppp-2.4.9/0104-011_scripts_redialer.diff.patch
>  rename patches/{ppp-2.4.7/0028-ppp-2.3.11-oedod.dif.patch => 
> ppp-2.4.9/0105-ppp-2.3.11-oedod.dif.patch} (74%)
>  create mode 100644 patches/ppp-2.4.9/0106-010_scripts_README.diff.patch
>  create mode 100644 patches/ppp-2.4.9/0107-no_crypt_hack.patch
>  rename patches/{ppp-2.4.7/0035-resolv.conf_no_log.patch => 
> ppp-2.4.9/0108-resolv.conf_no_log.patch} (56%)
>  rename patches/{ppp-2.4.7/0036-Debian-specific-changes.patch => 
> ppp-2.4.9/0109-zzz_config.patch} (60%)
>  create mode 100644 patches/ppp-2.4.9/0110-pppd-soname-hack.patch
>  rename 
> patches/{ppp-2.4.7/0039-Replace-vendored-hash-functions-with-libcrypto.patch 
> => ppp-2.4.9/0111-replace-vendored-hash-functions.patch} (92%)
>  rename patches/{ppp-2.4.7/0100-pppd-make-makefile-sysroot-aware.patch => 
> ppp-2.4.9/0200-pppd-make-makefile-sysroot-aware.patch} (63%)
>  rename 
> patches/{ppp-2.4.7/0101-pppd-make-the-self-made-configure-cross-aware.patch 
> => ppp-2.4.9/0201-pppd-make-the-self-made-configure-cross-aware.patch} (87%)
>  create mode 100644 patches/ppp-2.4.9/series
> 
> 
> base-commit: 1558d4bfae77147221bbbb853154932424c2425c
> -- 
> 2.29.2
> 
> 
> _______________________________________________
> ptxdist mailing list
> [email protected]
> To unsubscribe, send a mail with subject "unsubscribe" to 
> [email protected]
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#!/bin/bash

polkit_blacklist="
0.113/README-Note-to-send-security-reports-via-DBus-s-mech.patch
0.114/Add-gettext-support-for-.policy-files.patch
0.114/gettext-switch-to-default-translate-no.patch
0.116/tests-add-tests-for-high-uids.patch
01_pam_polkit.patch
02_gettext.patch
06_systemd-service.patch
"
openssl_blacklist="
config-hurd.patch
engines-path.patch
man-dir.patch
man-section.patch
rehash_pod.patch
version-script.patch
gnu_source.patch
c_rehash-compat.patch
dgst_hmac.patch
fix-pod-errors.patch
ppc64el.patch
disable_sslv3_test.patch
libdoc-manpgs-pod-spell.patch
soname.patch
no-symbolic.patch
"

elfutils_blacklist="
testsuite-ignore-elflint.diff
kfreebsd_path.patch
hurd_path.patch
ignore_strmerge.diff
0001-tests-Add-GCOV-flags-when-necessary.patch
"

cpufrequtils_blacklist="
01_add_cpufreq-aperf_manpage.patch
0002-cpufrequtils-Remove-proc-compile-option-and-interfac.patch
0004-i18n-Catalan.patch
0007-po-add-missing-word-in-DE.patch
10_build_static_lib.patch
11_dont_touch_po_files.patch
"

ppp_blacklist="
010_scripts_README.diff
011_scripts_redialer.diff
chat_man
no_crypt_hack
pppd-soname-hack.patch
secure-card-interpreter-fix
"

fakeroot_blacklist="
fix-shell-in-fakeroot
"

set -e
set -x

start="$(pwd)"
src="$(pwd)/$1"
deb="$(pwd)/$2"

base="$(basename "${src}")"
base="${base%_*}"
case "${base}" in
openssl|elfutils|cpufrequtils|ppp|fakeroot)
        ;;
policykit-1)
        base=polkit
        ;;
*)
        echo "Unknown package '${base}'. Aborting!"
        exit 1
        ;;
esac
blacklistptr="${base}_blacklist"
blacklist="${!blacklistptr}"

tmp="$(mktemp -d)"

cd "$tmp"

tar xf "$src"
pkg="$(ls -d ${base}-*)"

tar xf "$deb"
patches=debian/patches
for patch in $blacklist; do
        sed -i "s;\(${patch}\);#\1;" ${patches}/series
done

if [ "${base}" = "polkit" ]; then
        for dir in $(find debian/patches/ -mindepth 1 -maxdepth 1 -type d 
-printf "%P\n"); do
                sed -i "s;Subject:;Subject: ${dir}:;" "debian/patches/${dir}/"*
        done
fi
if [ "${base}" = "ppp" ]; then
        sed -i 's;^Description: \(.*\)$;Subject: \1\n;' debian/patches/*
        sed -i -e '/^Subject:/{p;d}' -e '1N;s/\(.*\n\)$/Subject: \1/;' 
debian/patches/*
fi

cd "$pkg"
git init
git add *
git commit -m "base"
git tag base

export FILTER_BRANCH_SQUELCH_WARNING=1

author="$(git config user.name) <$(git config user.email)>"
git quiltimport --patches=../$patches/ --author "${author}"
git filter-branch --msg-filter "cat | grep -v '^==*$' && echo '\nImported from 
$(basename $deb)\n\nSigned-off-by: ${author}'" base...master
git filter-branch -f --msg-filter "cat | sed -e '/\.diff$/s/-/ /g' -e 
'1s/.diff$//' " base...master

git format-patch --no-signature -N base
mkdir "$start/$pkg"
mv 0*.patch "$start/$pkg/"
cd "$start"
rm -rf "$tmp"

cd "$start/$pkg/"
sed -i 1d 0*.patch
ls 0*.patch > series

_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to