diff options
author | Moritz Bunkus | 2023-12-21 11:16:00 +0100 |
---|---|---|
committer | Moritz Bunkus | 2023-12-21 11:16:00 +0100 |
commit | 59487059fb0d1c923d335699cb3c619ff1c1fd57 (patch) | |
tree | e528b00a51817ffa1117caba8a662f9a466393d5 | |
parent | 9cc9bb0b0b603cbabd1f5b8cb96574587da054a7 (diff) | |
download | aur-59487059fb0d1c923d335699cb3c619ff1c1fd57.tar.gz |
update to 2.7; ensure HTTP server gets shut down
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | issue-276-8854cada70456102df32a1c5d51b46809e66d63f.diff | 88 |
3 files changed, 20 insertions, 105 deletions
@@ -1,18 +1,17 @@ pkgbase = osslsigncode pkgdesc = OpenSSL based Authenticode signing for PE/MSI/Java CAB files - pkgver = 2.6 - pkgrel = 3 + pkgver = 2.7 + pkgrel = 1 url = https://github.com/mtrojnar/osslsigncode arch = i686 arch = x86_64 license = GPL checkdepends = libfaketime makedepends = cmake + makedepends = perl depends = curl depends = openssl - source = https://github.com/mtrojnar/osslsigncode/archive/2.6.tar.gz - source = issue-276-8854cada70456102df32a1c5d51b46809e66d63f.diff - sha512sums = f2ad32d13bd355b196484af47e66e972a4f27e54c7a9188d754a83e9f751363dcc4d6b93f1aed1fef16b5eadead43f08b831dbe9fdfde11d159880450e3e819d - sha512sums = 7ca0deff8913623cbb2525eeae92b2369f35a68b46a4ec0fde4588113a2858df07e144c9a30d95487973d8fa9bc223bd6a655c6208a1000a0ef48a3aa08ff1b5 + source = https://github.com/mtrojnar/osslsigncode/archive/2.7.tar.gz + sha512sums = 474ea2fcce8efb999148f53637a701814d6625a7b2b407b0903f7876cbc78d330ca3b15167a334bc728c00516b638ebaf6233756331c9f3ec3d66a4a6de1fa19 pkgname = osslsigncode @@ -1,31 +1,28 @@ # Maintainer: Moritz Bunkus <moritz@bunkus.org> pkgname="osslsigncode" -pkgver="2.6" -pkgrel="3" +pkgver="2.7" +pkgrel="1" pkgdesc="OpenSSL based Authenticode signing for PE/MSI/Java CAB files" arch=('i686' 'x86_64') url="https://github.com/mtrojnar/osslsigncode" license=('GPL') depends=('curl' 'openssl') -makedepends=('cmake') +makedepends=('cmake' 'perl') checkdepends=('libfaketime') -source=("https://github.com/mtrojnar/${pkgname}/archive/${pkgver}.tar.gz" - "issue-276-8854cada70456102df32a1c5d51b46809e66d63f.diff") -sha512sums=('f2ad32d13bd355b196484af47e66e972a4f27e54c7a9188d754a83e9f751363dcc4d6b93f1aed1fef16b5eadead43f08b831dbe9fdfde11d159880450e3e819d' - '7ca0deff8913623cbb2525eeae92b2369f35a68b46a4ec0fde4588113a2858df07e144c9a30d95487973d8fa9bc223bd6a655c6208a1000a0ef48a3aa08ff1b5') +source=("https://github.com/mtrojnar/${pkgname}/archive/${pkgver}.tar.gz") +sha512sums=('474ea2fcce8efb999148f53637a701814d6625a7b2b407b0903f7876cbc78d330ca3b15167a334bc728c00516b638ebaf6233756331c9f3ec3d66a4a6de1fa19') prepare() { - patch -d "osslsigncode-${pkgver}" -p1 < "${srcdir}/issue-276-8854cada70456102df32a1c5d51b46809e66d63f.diff" - cmake \ -B build -S "$srcdir/osslsigncode-${pkgver}" \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DSTOP_SERVER=OFF + -DCMAKE_INSTALL_PREFIX=/usr } build() { + perl -pi -e 's{localhost}{127.0.0.1}' build/Testing/client_http.py + cmake --build build } @@ -35,5 +32,12 @@ check() { } package() { + # The HTTP server is started by cmake during the configuration + # phase, no matter if we want to run tests or not. Therefore we need + # to ensure the server's been shut down here. + cd build + python Testing/client_http.py || true 2> /dev/null + cd .. + DESTDIR="$pkgdir" cmake --install build } diff --git a/issue-276-8854cada70456102df32a1c5d51b46809e66d63f.diff b/issue-276-8854cada70456102df32a1c5d51b46809e66d63f.diff deleted file mode 100644 index 22a1340982c3..000000000000 --- a/issue-276-8854cada70456102df32a1c5d51b46809e66d63f.diff +++ /dev/null @@ -1,88 +0,0 @@ -diff --git a/msi.c b/msi.c -index 2ebad3b..2347e74 100644 ---- a/msi.c -+++ b/msi.c -@@ -186,13 +186,16 @@ typedef struct { - char *ministream; - char *minifat; - char *fat; -+ char *difat; - uint32_t dirtreeLen; - uint32_t miniStreamLen; - uint32_t minifatLen; - uint32_t fatLen; -+ uint32_t difatLen; - uint32_t ministreamsMemallocCount; - uint32_t minifatMemallocCount; - uint32_t fatMemallocCount; -+ uint32_t difatMemallocCount; - uint32_t dirtreeSectorsCount; - uint32_t minifatSectorsCount; - uint32_t fatSectorsCount; -@@ -1542,6 +1545,16 @@ static void fat_append(MSI_OUT *out, char *buf, uint32_t len) - out->fatLen += len; - } - -+static void difat_append(MSI_OUT *out, char *buf, uint32_t len) -+{ -+ if (out->difatLen == (uint64_t)out->difatMemallocCount * out->sectorSize) { -+ out->difatMemallocCount += 1; -+ out->difat = OPENSSL_realloc(out->difat, (size_t)(out->difatMemallocCount * out->sectorSize)); -+ } -+ memcpy(out->difat + out->difatLen, buf, (size_t)len); -+ out->difatLen += len; -+} -+ - static int msi_dirent_delete(MSI_DIRENT *dirent, const u_char *name, uint16_t nameLen) - { - int i; -@@ -1938,15 +1951,6 @@ static void dirtree_save(MSI_DIRENT *dirent, BIO *outdata, MSI_OUT *out) - out->sectorNum += out->dirtreeSectorsCount; - } - --static void fat_pad_last_sector(MSI_OUT *out, int padValue, char *buf) --{ -- if (out->fatLen % out->sectorSize > 0) { -- uint32_t remain = out->sectorSize - out->fatLen % out->sectorSize; -- memset(buf, padValue, (size_t)remain); -- fat_append(out, buf, remain); -- } --} -- - static int fat_save(BIO *outdata, MSI_OUT *out) - { - char buf[MAX_SECTOR_SIZE]; -@@ -1955,8 +1959,6 @@ static int fat_save(BIO *outdata, MSI_OUT *out) - remain = (out->fatLen + out->sectorSize - 1) / out->sectorSize; - out->fatSectorsCount = (out->fatLen + remain * 4 + out->sectorSize - 1) / out->sectorSize; - -- fat_pad_last_sector(out, 0, buf); -- - if (out->fatSectorsCount > DIFAT_IN_HEADER) { - difatEntriesPerSector = (out->sectorSize / 4) - 1; - difatSectors = (out->fatSectorsCount - DIFAT_IN_HEADER + difatEntriesPerSector - 1) / difatEntriesPerSector; -@@ -2001,7 +2003,7 @@ static int fat_save(BIO *outdata, MSI_OUT *out) - PUT_UINT32_LE(out->sectorNum + 1, buf + out->sectorSize - 4); - } - -- fat_append(out, buf, out->sectorSize); -+ difat_append(out, buf, out->sectorSize); - out->sectorNum++; - } - } -@@ -2019,9 +2021,14 @@ static int fat_save(BIO *outdata, MSI_OUT *out) - } - - /* empty unallocated free sectors in the last FAT sector */ -- fat_pad_last_sector(out, (int)FREESECT, buf); -+ if (out->fatLen % out->sectorSize > 0) { -+ remain = out->sectorSize - out->fatLen % out->sectorSize; -+ memset(buf, (int)FREESECT, (size_t)remain); -+ fat_append(out, buf, remain); -+ } - - BIO_write(outdata, out->fat, (int)out->fatLen); -+ BIO_write(outdata, out->difat, (int)out->difatLen); - return 1; /* OK */ - } - |