Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowed engrampa #24234

Closed
wants to merge 10 commits into from
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
diff -Nur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
--- a/util/grub.d/10_linux.in 2015-09-27 14:14:45.544730230 -0300
+++ b/util/grub.d/10_linux.in 2015-09-27 15:34:19.822404966 -0300
@@ -80,9 +80,11 @@
if [ x$type != xsimple ] ; then
case $type in
recovery)
- title="$(gettext_printf "%s, with Linux %s (recovery mode)" "${os}" "${version}")" ;;
+ title="$(gettext_printf "%s, %s kernel (recovery mode)" "${os}" "${version}")" ;;
+ fallback)
+ title="$(gettext_printf "%s, %s kernel (fallback initramfs)" "${os}" "${version}")" ;;
*)
- title="$(gettext_printf "%s, with Linux %s" "${os}" "${version}")" ;;
+ title="$(gettext_printf "%s, %s kernel" "${os}" "${version}")" ;;
esac
if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
@@ -94,7 +96,7 @@
else
echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
fi
- if [ x$type != xrecovery ] ; then
+ if [ x$type != xrecovery ] && [ x$type != xfallback ] ; then
save_default_entry | grub_add_tab
fi

@@ -126,7 +128,7 @@
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
fi
- message="$(gettext_printf "Loading Linux %s ..." ${version})"
+ message="$(gettext_printf "Loading %s kernel ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$message" | grub_quote)'
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
@@ -182,7 +184,7 @@
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
+ version=`echo $basename | sed -e "s,vmlinuz-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"

@@ -238,6 +240,18 @@

linux_entry "${OS}" "${version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+
+ if test -e "${dirname}/initramfs-${version}-fallback.img" ; then
+ initrd="initramfs-${version}-fallback.img"
+
+ if test -n "${initrd}" ; then
+ gettext_printf "Found fallback initramfs image: %s\n" "${dirname}/${initrd}" >&2
+ fi
+
+ linux_entry "${OS}" "${version}" fallback \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ fi
+
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \
"single ${GRUB_CMDLINE_LINUX}"
diff -Nur a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
--- a/util/grub.d/20_linux_xen.in 2015-09-27 14:14:45.544730230 -0300
+++ b/util/grub.d/20_linux_xen.in 2015-09-27 15:35:00.589739244 -0300
@@ -88,9 +88,11 @@
fi
if [ x$type != xsimple ] ; then
if [ x$type = xrecovery ] ; then
- title="$(gettext_printf "%s, with Xen %s and Linux %s (recovery mode)" "${os}" "${xen_version}" "${version}")"
+ title="$(gettext_printf "%s, with Xen %s and %s kernel (recovery mode)" "${os}" "${xen_version}" "${version}")"
+ elif [ x$type = xfallback ] ; then
+ title="$(gettext_printf "%s, with Xen %s and %s kernel (fallback initramfs)" "${os}" "${xen_version}" "${version}")"
else
- title="$(gettext_printf "%s, with Xen %s and Linux %s" "${os}" "${xen_version}" "${version}")"
+ title="$(gettext_printf "%s, with Xen %s and %s kernel" "${os}" "${xen_version}" "${version}")"
fi
replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
if [ x"Xen ${xen_version}>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
@@ -103,7 +105,7 @@
title="$(gettext_printf "%s, with Xen hypervisor" "${os}")"
echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'xen-gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
fi
- if [ x$type != xrecovery ] ; then
+ if [ x$type != xrecovery ] && [ x$type != xfallback ] ; then
save_default_entry | grub_add_tab | sed "s/^/$submenu_indentation/"
fi

@@ -112,7 +114,7 @@
fi
printf '%s\n' "${prepare_boot_cache}" | sed "s/^/$submenu_indentation/"
xmessage="$(gettext_printf "Loading Xen %s ..." ${xen_version})"
- lmessage="$(gettext_printf "Loading Linux %s ..." ${version})"
+ lmessage="$(gettext_printf "Loading %s kernel ..." ${version})"
sed "s/^/$submenu_indentation/" << EOF
echo '$(echo "$xmessage" | grub_quote)'
if [ "\$grub_platform" = "pc" -o "\$grub_platform" = "" ]; then
@@ -210,7 +212,7 @@
basename=`basename $linux`
dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname`
- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
+ version=`echo $basename | sed -e "s,vmlinuz-,,g"`
alt_version=`echo $version | sed -e "s,\.old$,,g"`
linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"

@@ -252,6 +254,18 @@

linux_entry "${OS}" "${version}" "${xen_version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+
+ if test -e "${dirname}/initramfs-${version}-fallback.img" ; then
+ initrd="initramfs-${version}-fallback.img"
+
+ if test -n "${initrd}" ; then
+ gettext_printf "Found fallback initramfs image: %s\n" "${dirname}/${initrd}" >&2
+ fi
+
+ linux_entry "${OS}" "${version}" "${xen_version}" fallback \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+ fi
+
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" "${xen_version}" recovery \
"single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Np1
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff -Nur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
--- a/util/grub.d/10_linux.in 2015-09-27 14:14:45.544730230 -0300
+++ b/util/grub.d/10_linux.in 2015-09-27 14:58:23.533917184 -0300
@@ -31,7 +31,17 @@
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ if echo ${GRUB_DISTRIBUTOR} | grep -qi Parabola ; then
+ OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
+ elif echo ${GRUB_DISTRIBUTOR} | grep -qi Blag ; then
+ OS="${GRUB_DISTRIBUTOR} Linux and GNU"
+ elif echo ${GRUB_DISTRIBUTOR} | grep -qi Musix ; then
+ OS="${GRUB_DISTRIBUTOR} GNU+Linux"
+ elif echo ${GRUB_DISTRIBUTOR} | grep -qi Dragora ; then
+ OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
+ else
+ OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ fi
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi

diff -Nur a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
--- a/util/grub.d/20_linux_xen.in 2015-09-27 14:14:45.544730230 -0300
+++ b/util/grub.d/20_linux_xen.in 2015-09-27 14:59:16.319319658 -0300
@@ -31,7 +31,17 @@
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ if echo ${GRUB_DISTRIBUTOR} | grep -qi Parabola ; then
+ OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
+ elif echo ${GRUB_DISTRIBUTOR} | grep -qi Blag ; then
+ OS="${GRUB_DISTRIBUTOR} Linux and GNU"
+ elif echo ${GRUB_DISTRIBUTOR} | grep -qi Musix ; then
+ OS="${GRUB_DISTRIBUTOR} GNU+Linux"
+ elif echo ${GRUB_DISTRIBUTOR} | grep -qi Dragora ; then
+ OS="${GRUB_DISTRIBUTOR} GNU/Linux-libre"
+ else
+ OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ fi
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}"
fi

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Np1
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Patches OS X detection out of os-prober hook on non-x86 architectures. The
Patches XNU detection out of os-prober hook on non-x86 architectures. The
menu entries generated for those are invalid for non-x86 Mac stuff.
--- util/grub.d/30_os-prober.in
+++ util/grub.d/30_os-prober.in
@@ -42,6 +42,11 @@ if [ -z "${OSPROBED}" ] ; then
fi

osx_entry() {
+ # GRUB won't load OS X outside of x86, no entry
+ # GRUB won't load XNU outside of x86, no entry
+ case "x`uname -m`" in
+ xi?86|xx86_64) ;;
+ *) return ;;
Expand Down
183 changes: 183 additions & 0 deletions srcpkgs/minitube/patches/remove_unfree_recommendations.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
diff -Naurp0 minitube-3.4.2.orig/minitube.pro minitube-3.4.2/minitube.pro
--- minitube-3.4.2.orig/minitube.pro 2020-06-10 22:50:13.000000000 +0600
+++ minitube-3.4.2/minitube.pro 2020-07-31 01:34:31.851701380 +0600
@@ -111 +110,0 @@ HEADERS += src/video.h \
- src/appwidget.h \
@@ -185 +183,0 @@ SOURCES += src/main.cpp \
- src/appwidget.cpp \
diff -Naurp0 minitube-3.4.2.orig/src/aboutview.cpp minitube-3.4.2/src/aboutview.cpp
--- minitube-3.4.2.orig/src/aboutview.cpp 2020-06-10 22:50:13.000000000 +0600
+++ minitube-3.4.2/src/aboutview.cpp 2020-07-31 01:32:34.226706841 +0600
@@ -33 +32,0 @@ $END_LICENSE */
-#include "appwidget.h"
@@ -161 +159,0 @@ AboutView::AboutView(QWidget *parent) :
- verticalLayout->addWidget(new AppsWidget());
diff -Naurp0 minitube-3.4.2.orig/src/appwidget.cpp minitube-3.4.2/src/appwidget.cpp
--- minitube-3.4.2.orig/src/appwidget.cpp 2020-06-10 22:50:13.000000000 +0600
+++ minitube-3.4.2/src/appwidget.cpp 1970-01-01 06:00:00.000000000 +0600
@@ -1,115 +0,0 @@
-#include "appwidget.h"
-#include "constants.h"
-#include "http.h"
-#ifdef APP_EXTRA
-#include "updatedialog.h"
-#endif
-
-AppsWidget::AppsWidget(QWidget *parent) : QWidget(parent) {
- const int padding = 30;
-
- QBoxLayout *layout = new QHBoxLayout(this);
- layout->setMargin(padding);
- layout->setSpacing(padding*2);
- layout->setAlignment(Qt::AlignCenter);
-
-#ifdef APP_MAC
- const QString ext = "dmg";
-#elif defined APP_WIN
- const QString ext = "exe";
-#else
- const QString ext = "deb";
-#endif
-
-#ifdef APP_MAC
- setupApp("Sofa", "sofa." + ext);
-#endif
- setupApp("Finetune", "finetune." + ext);
- setupApp("Musictube", "musictube." + ext);
- setupApp("Musique", "musique." + ext);
-}
-
-void AppsWidget::setupApp(const QString &name, const QString &code) {
- AppWidget *w = new AppWidget(name, code);
- layout()->addWidget(w);
-}
-
-void AppsWidget::paintEvent(QPaintEvent *e) {
- Q_UNUSED(e);
- QStyleOption o;
- o.initFrom(this);
- QPainter p(this);
- style()->drawPrimitive(QStyle::PE_Widget, &o, &p, this);
-}
-
-AppWidget::AppWidget(const QString &name, const QString &code, QWidget *parent) : QWidget(parent), icon(0), name(name), downloadButton(0) {
- const QString unixName = code.left(code.lastIndexOf('.'));
- const QString baseUrl = QLatin1String("https://") + Constants::ORG_DOMAIN;
- const QString filesUrl = baseUrl + QLatin1String("/files/");
- url = filesUrl + unixName + QLatin1String("/") + code;
- webPage = baseUrl + QLatin1String("/") + unixName;
-
- QBoxLayout *layout = new QVBoxLayout(this);
- layout->setMargin(0);
- layout->setAlignment(Qt::AlignHCenter);
-
- icon = new QLabel();
- icon->setMinimumHeight(128);
- layout->addWidget(icon);
- const QString iconUrl = filesUrl + QLatin1String("products/") + unixName + QLatin1String(".png");
- QObject *reply = Http::instance().get(iconUrl);
- connect(reply, SIGNAL(data(QByteArray)), SLOT(iconDownloaded(QByteArray)));
-
- QLabel *appTitle = new QLabel(name);
- appTitle->setAlignment(Qt::AlignHCenter);
- layout->addWidget(appTitle);
-
-#ifdef APP_EXTRA
-#if !defined(APP_UBUNTU) && !defined(APP_MAC_STORE)
- downloadButton = new QPushButton(tr("Download"));
- downloadButton->setAttribute(Qt::WA_MacSmallSize);
- downloadButton->setCursor(Qt::ArrowCursor);
- QSizePolicy sp = downloadButton->sizePolicy();
- sp.setHorizontalPolicy(QSizePolicy::Fixed);
- sp.setRetainSizeWhenHidden(true);
- downloadButton->setSizePolicy(sp);
- connect(downloadButton, SIGNAL(clicked(bool)), SLOT(downloadApp()));
- layout->addWidget(downloadButton, Qt::AlignHCenter);
- layout->setAlignment(downloadButton, Qt::AlignHCenter);
- downloadButton->hide();
-#endif
-#endif
-
- setCursor(Qt::PointingHandCursor);
-}
-
-void AppWidget::enterEvent(QEvent *e) {
- Q_UNUSED(e);
- if (downloadButton) downloadButton->show();
-}
-
-void AppWidget::leaveEvent(QEvent *e) {
- Q_UNUSED(e);
- if (downloadButton) downloadButton->hide();
-}
-
-void AppWidget::mouseReleaseEvent(QMouseEvent *e) {
- if (e->button() == Qt::LeftButton) {
- QDesktopServices::openUrl(webPage);
- }
-}
-
-void AppWidget::iconDownloaded(const QByteArray &bytes) {
- QPixmap pixmap;
- pixmap.loadFromData(bytes, "PNG");
- icon->setPixmap(pixmap);
-}
-
-void AppWidget::downloadApp() {
-#ifdef APP_EXTRA
- if (!icon) return;
- UpdateDialog *dialog = new UpdateDialog(icon->pixmap(), name, QString(), url, this);
- dialog->downloadUpdate();
- dialog->show();
-#endif
-}
diff -Naurp0 minitube-3.4.2.orig/src/appwidget.h minitube-3.4.2/src/appwidget.h
--- minitube-3.4.2.orig/src/appwidget.h 2020-06-10 22:50:13.000000000 +0600
+++ minitube-3.4.2/src/appwidget.h 1970-01-01 06:00:00.000000000 +0600
@@ -1,46 +0,0 @@
-#ifndef APPWIDGET_H
-#define APPWIDGET_H
-
-#include <QtWidgets>
-
-
-class AppWidget : public QWidget {
-
- Q_OBJECT
-
-public:
- AppWidget(const QString &name, const QString &code, QWidget *parent = 0);
- QLabel *icon;
-
-protected:
- void enterEvent(QEvent *e);
- void leaveEvent(QEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
-
-private slots:
- void iconDownloaded(const QByteArray &bytes);
- void downloadApp();
-
-private:
- QPushButton *downloadButton;
- QString name;
- QString url;
- QString webPage;
-};
-
-class AppsWidget : public QWidget {
-
- Q_OBJECT
-
-public:
- AppsWidget(QWidget *parent = 0);
-
-protected:
- void paintEvent(QPaintEvent *e);
-
-private:
- void setupApp(const QString &name, const QString &code);
-
-};
-
-#endif // APPWIDGET_H
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-Np1
22 changes: 22 additions & 0 deletions srcpkgs/unzip/patches/liberation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff -Naurp1 unzip60.orig/match.c unzip60/match.c
--- unzip60.orig/match.c 2005-08-14 23:00:36.000000000 +0600
+++ unzip60/match.c 2020-08-04 20:07:08.645312583 +0600
@@ -29,12 +29,9 @@

- Copyright on recmatch() from Zip's util.c (although recmatch() was almost
- certainly written by Mark Adler...ask me how I can tell :-) ):
+ Copyright on recmatch() from Zip's util.c
+ Copyright (c) 1990-2005 Info-ZIP. All rights reserved.

- Copyright (C) 1990-1992 Mark Adler, Richard B. Wales, Jean-loup Gailly,
- Kai Uwe Rommel and Igor Mandrichenko.
-
- Permission is granted to any individual or institution to use, copy,
- or redistribute this software so long as all of the original files are
- included unmodified, that it is not sold for profit, and that this copy-
- right notice is retained.
+ See the accompanying file LICENSE, version 2004-May-22 or later
+ for terms of use.
+ If, for some reason, both of these files are missing, the Info-ZIP license
+ also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html