From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-045.btinternet.com (mailomta18-sa.btinternet.com [213.120.69.24]) by sourceware.org (Postfix) with ESMTPS id 2B6423858D1E for ; Tue, 21 Feb 2023 04:59:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B6423858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from sa-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.38.7]) by sa-prd-fep-045.btinternet.com with ESMTP id <20230219153749.SQBG5235.sa-prd-fep-045.btinternet.com@sa-prd-rgout-004.btmx-prd.synchronoss.net>; Sun, 19 Feb 2023 15:37:49 +0000 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 613943C65046A575 X-Originating-IP: [81.153.98.246] X-OWM-Source-IP: 81.153.98.246 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvhedrudejfedgkedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeffkeeigfdujeehteduiefgjeeltdelgeelteekudetfedtffefhfeufefgueettdenucfkphepkedurdduheefrdelkedrvdegieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtiegnpdhinhgvthepkedurdduheefrdelkedrvdegiedpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtoheptgihghifihhnqdgrphhpshestgihghifihhnrdgtohhmpdhrtghpthhtohepthgrkhgrshhhihdrhigrnhhosehnihhfthihrdhnvgdrjhhp X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.106] (81.153.98.246) by sa-prd-rgout-004.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 613943C65046A575; Sun, 19 Feb 2023 15:37:49 +0000 Message-ID: <3fcd159f-3925-d541-8a91-ef7431608a00@dronecode.org.uk> Date: Sun, 19 Feb 2023 15:37:47 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [ITP] openh264 (2.3.1) To: Takashi Yano , "cygwin-apps@cygwin.com" References: <20230205173745.cf6aa7153ce8eae1dfd52c4c@nifty.ne.jp> <61e8a80b73a2d431afa338bd274dac17c5c87e25.camel@cygwin.com> <20230206142523.23a3b4b02cf8a8c5ef54b9f0@nifty.ne.jp> <20230210140531.673c73c9e3c2f8682418e803@nifty.ne.jp> <20230210141850.bfb1fbe60f09ef83d7407374@nifty.ne.jp> <20230210142534.18683ad2cd9e61e21d8fa8ab@nifty.ne.jp> <0e72ab79-fa2b-71fb-c453-3e29590ea7e4@dronecode.org.uk> <846e51c3-f96b-348a-a6aa-2b12bb74376d@Shaw.ca> <20230214181138.b1ecbd47e2ed919ed49cc714@nifty.ne.jp> <87cz6cwlv6.fsf@Otto.invalid> <20230214212801.83ead05c9df51b281e26baf4@nifty.ne.jp> <878rh0w66r.fsf@Otto.invalid> <20230215062152.474ad26d8c3b4a9bd0d2bb82@nifty.ne.jp> <20230217174959.c4172f9b903763dc58df4320@nifty.ne.jp> Content-Language: en-GB From: Jon Turney In-Reply-To: <20230217174959.c4172f9b903763dc58df4320@nifty.ne.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1191.1 required=5.0 tests=BAYES_00,FORGED_SPF_HELO,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 17/02/2023 08:49, Takashi Yano via Cygwin-apps wrote: > On Thu, 16 Feb 2023 19:24:24 +0000 > Jon Turney wrote: >> On 14/02/2023 21:21, Takashi Yano via Cygwin-apps wrote: >>> On Tue, 14 Feb 2023 17:41:16 +0100 >>> ASSI wrote: >>>> Takashi Yano via Cygwin-apps writes: >>>>> Thanks for the advice. I have revised the cygport file. >>>> >>>> You are getting the file and the hash from the same unprotected source. >>>> I was thinking you should put the hash into the cygport file and hence >>>> the postinstall script. >>>> >>>> Also note that the system doing the postinstall will not necessarily >>>> have internet access, so you'll need to cope with errors that will >>>> produce. >>> >>> Thanks. >>> >>> The new cygport file attached downloads md5hash during >>> the packaging process and embeds it into postinstall >>> script. Does this make sense? >> >> Thanks. >> >> So, this looks like it works, and meets the requirements. >> >> Is md5 the only hash available? This is not really considered "good >> enough" any more. >> >> As a thought-experiment, consider doing it slightly differently: >> >> package contains: >> - the headers >> - a data file with the version (or maybe URL) and hash >> - a script which can fetch (using above data) or remove the DLL >> - postinstall and preremove scripts which invoke that script appropriately >> >> (I think this means the post/pre scripts can be static, and packaged via >> $C, rather than written by the cygport itself) >> >> What do you think of that? > > Thanks for the advice! > > So, how about this one? > > package contains: > - the headers > - the data files with the version and hash > - postinstall and preremove scripts which fetch (using above data) > and remove the DLL Great, thanks. I hope this means you think this is a better approach, rather than just humouring me :) A few minor points: * It seems like the empty dummy archive could be made with something like just: tar -Jcf ${SRC_URI} --files-from /dev/null * If the postinstall failed somehow, the preremove script will fail trying to remove a file which doesn't exist. It might be a good idea to use 'rm -f' to ensure that doesn't happen. * I don't think you should need: > # Install postinstall/preremove scripts > mkdir -p ${D}/etc/postinstall ${D}/etc/preremove > cp ${C}/lib${NAME}.postinstall ${D}/etc/postinstall/lib${NAME}.sh > cp ${C}/lib${NAME}.preremove ${D}/etc/preremove/lib${NAME}.sh > This should happen automatically if the files are in $C (and you can list them in CYGWIN_FILES or make them with cygwin.patch file to put them there)