Skip to content

Commit

Permalink
automatic merge by nix-conf
Browse files Browse the repository at this point in the history
Merged branches:
- amc-my-patches
- ucspi-tcp-ipv6-support
- gnuplot-info
- nixos-rebuild-dont-reexec
- daemontools-gcc14
- kernelshark-fix
- qtcreator-llvm-18
- wol-fix
- perl-cryptdes-fix
  • Loading branch information
nix-conf committed Jan 2, 2025
8 parents 6df2492 + 887f1df + 8bc6f3b + c541372 + 454c080 + caab23e + f67900d + 30ee3a4 commit e3175c1
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
From 20c120c57a65eb0ab9203cb347bb78b664b80974 Mon Sep 17 00:00:00 2001
From: Michal Sojka <michal.sojka@cvut.cz>
Date: Sun, 21 Jan 2018 23:13:00 +0100
Subject: [PATCH 1/2] AMC-TXT: New global option ShowGroupText

When this option is enabled (default), the text after group start/end
marks i.e., after "*(" or "*)", is shown in the printed tests. This is
the same behavior as before this commit.

By setting this option to 0, no group marks are generated. This is
useful if groups are used merely as containers for similar questions
and have numquestions=1 option. In this case, it makes little sense to
add group text before and after every question.
---
AMC-perl/AMC/Filter/plain.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/AMC-perl/AMC/Filter/plain.pm b/AMC-perl/AMC/Filter/plain.pm
index 5970266d..e0f7d4be 100644
--- a/AMC-perl/AMC/Filter/plain.pm
+++ b/AMC-perl/AMC/Filter/plain.pm
@@ -63,6 +63,7 @@ sub new {
TitleWidth
Pages
RandomSeed
+ ShowGroupText
PreAssociation PreAssociationKey PreAssociationName
/
];
@@ -75,6 +76,7 @@ sub new {
CompleteMulti SeparateAnswerSheet AutoMarks
Arabic
ManualDuplex SingleSided
+ ShowGroupText
/
];

@@ -119,6 +121,7 @@ sub new {
namefieldlinespace => '.5em',
titlewidth => ".47\\linewidth",
randomseed => "1527384",
+ showgrouptext => 1,
lang => '',
code => 0,
'latex-preambule' => '',
@@ -487,7 +490,7 @@ sub read_file {
if (/^\s*\*([\(\)])(?:\[([^]]*)\])?\s*(.*)/) {
my $action = $1;
my $options = $2;
- my $text = $3;
+ my $text=$self->{'options'}->{'showgrouptext'} ? $3 : "";
debug "Group A=" . printable($action) . " O=" . printable($options);
my %oo = $self->read_options($options);
if ( $action eq '(' ) {
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
From bed560fcf352343d75f8a4c719d2710c60420672 Mon Sep 17 00:00:00 2001
From: Michal Sojka <michal.sojka@cvut.cz>
Date: Fri, 25 Jan 2019 18:26:26 +0100
Subject: [PATCH 2/2] Test 8-page alignment

---
AMC-buildpdf.cc | 2 ++
AMC-perl/AMC/Annotate.pm | 11 +++++++++++
2 files changed, 13 insertions(+)

diff --git a/AMC-buildpdf.cc b/AMC-buildpdf.cc
index 73dea3ca..a4549e57 100644
--- a/AMC-buildpdf.cc
+++ b/AMC-buildpdf.cc
@@ -89,6 +89,8 @@ int main(int argc, char** argv )
processing_error = PDF.load_pdf(command + 9);
} else if(sscanf(command, "page pdf %ld", &i) == 1) {
processing_error = PDF.new_page_from_pdf(i);
+ } else if(strcmp(command, "page empty") == 0) {
+ processing_error = PDF.next_page();
} else if(strcmp(command, "matrix identity") == 0) {
PDF.identity_matrix();
} else if(sscanf(command, "matrix %lf %lf %lf %lf %lf %lf",
diff --git a/AMC-perl/AMC/Annotate.pm b/AMC-perl/AMC/Annotate.pm
index 6e15af59..cbb49f37 100644
--- a/AMC-perl/AMC/Annotate.pm
+++ b/AMC-perl/AMC/Annotate.pm
@@ -1036,6 +1036,14 @@ sub student_draw_page {
}
}

+sub draw_empty_page {
+ my ($self,$page)=@_;
+
+ debug "Drawing empty page #$page";
+
+ $self->command("page empty");
+}
+
# process a student copy

sub process_student {
@@ -1077,6 +1085,9 @@ sub process_student {
for my $page ( $self->student_pages($student) ) {
$self->student_draw_page( $student, $page );
}
+ for (my $i = $self->student_pages($student); $i % 8 != 0; $i++) {
+ $self->draw_empty_page($i+1);
+ }

$self->{data}->end_transaction('aOST');
}
--
2.34.1

5 changes: 5 additions & 0 deletions pkgs/by-name/au/auto-multiple-choice/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ stdenv.mkDerivation (finalAttrs: rec {
"GCC_PP=${stdenv.cc.targetPrefix}c++"
];

patches = [
./0001-AMC-TXT-New-global-option-ShowGroupText.patch
./0002-Test-8-page-alignment.patch
];

preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
Expand Down
18 changes: 17 additions & 1 deletion pkgs/by-name/uc/ucspi-tcp/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
ipv6Support ? true,
}:

stdenv.mkDerivation rec {
Expand All @@ -19,7 +20,11 @@ stdenv.mkDerivation rec {
url = "http://ftp.de.debian.org/debian/pool/main/u/ucspi-tcp/ucspi-tcp_0.88-3.diff.gz";
sha256 = "0mzmhz8hjkrs0khmkzs5i0s1kgmgaqz07h493bd5jj5fm5njxln6";
})
./remove-setuid.patch
] ++ lib.optional ipv6Support [
(fetchurl {
url = "https://salsa.debian.org/debian/ucspi-tcp/-/raw/debian/1%250.88-7/debian/ipv6-support.patch";
sha256 = "sha256-sFOVWJBsnLNZhsOH+TFmYt7NyMwJfbtSg/qCKEAyaQI=";
})
];

# Apply Debian patches
Expand All @@ -28,6 +33,9 @@ stdenv.mkDerivation rec {
echo "Applying patch $fname"
patch < "$fname"
done
# Remove setuid
substituteInPlace hier.c --replace ',02755);' ',0755);'
'';

# The build system is weird; 'make install' doesn't install anything, instead
Expand All @@ -50,6 +58,14 @@ stdenv.mkDerivation rec {
# run the newly built installer
./install
'' + lib.optionalString ipv6Support ''
# Replicate Debian's man install logic (some man pages from
# ipv6-support.patch will be overwritten below by
# debian/ucspi-tcp-man/*.1).
rm -rf "$out/usr/man/man5" # don't include tcp-environ(5)
mv -v "$out"/man/man1/*.1 "$out/share/man/man1/"
'' + ''
# Install Debian man pages (upstream has none)
cp debian/ucspi-tcp-man/*.1 "$out/share/man/man1"
'';
Expand Down
15 changes: 0 additions & 15 deletions pkgs/by-name/uc/ucspi-tcp/remove-setuid.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 51fda02d223f516c4948606c050bfc732b95f481 Mon Sep 17 00:00:00 2001
From: Brian Fraser <brian.fraser@booking.com>
Date: Thu, 24 Sep 2020 15:00:20 +0200
Subject: [PATCH] _des.h: expose perl_des_expand_key() and perl_des_crypt() to
prevent implicit delaration errors/warnings

---
_des.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/_des.h b/_des.h
index ec56b27..b636cda 100644
--- a/_des.h
+++ b/_des.h
@@ -4,4 +4,6 @@ typedef unsigned long des_ks[32];

void _des_crypt( des_cblock in, des_cblock out, des_ks key, int encrypt );
void _des_expand_key( des_user_key userKey, des_ks key );
+void perl_des_expand_key(des_user_key userKey, des_ks ks);
+void perl_des_crypt( des_cblock input, des_cblock output, des_ks ks, int encrypt );

--
2.24.3 (Apple Git-128)

9 changes: 6 additions & 3 deletions pkgs/os-specific/linux/nixos-rebuild/nixos-rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,12 @@ if [[ -z $_NIXOS_REBUILD_REEXEC && -n $canRun && -z $fast ]]; then
SHOULD_REEXEC=1
fi
else
runCmd nix "${flakeFlags[@]}" build --out-link "${tmpDir}/nixos-rebuild" "$flake#$flakeAttr.config.system.build.nixos-rebuild" "${extraBuildFlags[@]}" "${lockFlags[@]}"
if p=$(readlink -e "${tmpDir}/nixos-rebuild"); then
SHOULD_REEXEC=1
targetSystem=$(runCmd nix eval --raw "$flake#$flakeAttr.pkgs.system")
if [[ $(nix show-config --json | jq -r '.system.value') == $targetSystem ]]; then
runCmd nix "${flakeFlags[@]}" build --out-link "${tmpDir}/nixos-rebuild" "$flake#$flakeAttr.config.system.build.nixos-rebuild" "${extraBuildFlags[@]}" "${lockFlags[@]}"
if p=$(readlink -e "${tmpDir}/nixos-rebuild"); then
SHOULD_REEXEC=1
fi
fi
fi

Expand Down
8 changes: 8 additions & 0 deletions pkgs/os-specific/linux/trace-cmd/kernelshark.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
freefont_ttf,
wrapQtAppsHook,
qtwayland,
fetchpatch,
}:

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -28,6 +29,13 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-KV8ahV2koX7OL1C42H5If14e7m54jv0DlZ1dNsVRUWE=";
};

patches = [
(fetchpatch {
url = "https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/patch/?id=9e33324644fff49b7aa15d34f836e72af8b32c78";
hash = "sha256-2XtEQ4WscLlUiEQYG2HiHuysMzVzlG05PVreLRVM8Lc=";
})
];

outputs = [ "out" ];

nativeBuildInputs = [
Expand Down
19 changes: 14 additions & 5 deletions pkgs/tools/graphics/gnuplot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
qttools,
qtbase,
qtsvg,
enableInfo ? true,
emacs,
}:

assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null);
Expand All @@ -48,11 +50,16 @@ in
sha256 = "sha256-6FpmDBoqGAj/JPfmmYH/y6xmpFydz3EbZWELJupxN5o=";
};

nativeBuildInputs = [
makeWrapper
pkg-config
texinfo
] ++ lib.optional withQt qttools;
outputs = [ "out" ] ++ lib.optional enableInfo "info";

nativeBuildInputs =
[
makeWrapper
pkg-config
texinfo
]
++ lib.optional withQt qttools
++ lib.optional enableInfo emacs;

buildInputs =
[
Expand Down Expand Up @@ -122,6 +129,8 @@ in

enableParallelBuilding = true;

installTargets = [ "install" ] ++ lib.optional enableInfo "install-info";

meta = with lib; {
homepage = "http://www.gnuplot.info/";
description = "Portable command-line driven graphing utility for many platforms";
Expand Down
5 changes: 5 additions & 0 deletions pkgs/top-level/perl-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5018,6 +5018,11 @@ with self; {
url = "mirror://cpan/authors/id/D/DP/DPARIS/Crypt-DES-2.07.tar.gz";
hash = "sha256-LbHrtYN7TLIAUcDuW3M7RFPjE33wqSMGA0yGdiHt1+c=";
};
patches = [
# Fix build error with gcc14. See https://rt.cpan.org/Public/Bug/Display.html?id=133363.
# Source: https://rt.cpan.org/Public/Ticket/Attachment/1912753/1024508/0001-_des.h-expose-perl_des_expand_key-and-perl_des_crypt.patch
../development/perl-modules/CryptDES-expose-perl_des_expand_key-and-perl_des_crypt.patch
];
meta = {
description = "Perl DES encryption module";
license = with lib.licenses; [ bsdOriginalShortened ];
Expand Down

0 comments on commit e3175c1

Please sign in to comment.