X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: "Yaakov (Cygwin/X)" Subject: Re: UAC .manifest files Date: Wed, 03 Jun 2009 19:25:13 -0500 Lines: 152 Message-ID: References: <4A25FA67 DOT 4050805 AT users DOT sourceforge DOT net> <20090603081102 DOT GI23519 AT calimero DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090404020901070308070808" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 In-Reply-To: <20090603081102.GI23519@calimero.vinschen.de> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------090404020901070308070808 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 03/06/2009 03:11, Corinna Vinschen wrote: > I never saw more than exactly this list. Got it (and with "instal" with one L). > I don't know if it matters, but it certainly doesn't hurt either. As a > suggestion, when automating this, the name could be constructed like > this: > > Organization=Cygwin > Division= > Name= As for why, IIRC you mentioned[1] before that the manifests are cached; I suppose the name= attribute would be used in the cached data, hence the requirement to be unique. Some additional googling revealed that you also mentioned that the manifests need to be executable[2]. The attached patch is what I have in mind. It won't apply to SVN trunk yet due to other uncommitted patches in the queue, but I need to fix that soon to get a long-overdue release out the door. Anything else that I may not be aware of before I commit this? [1] http://www.cygwin.com/ml/cygwin/2008-11/msg00163.html [2] http://www.cygwin.com/ml/cygwin-apps/2008-08/msg00148.html Yaakov --------------090404020901070308070808 Content-Type: text/plain; name="0.9.6-uac-manifest.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0.9.6-uac-manifest.patch" Index: bin/cygport.in =================================================================== --- bin/cygport.in (revision 6306) +++ bin/cygport.in (working copy) @@ -1123,6 +1156,7 @@ # __prepinfo # __prepman # __prepstrip +# __prepuac # __prepvargames # __prep_empty_dirs # __prep_libtool_modules @@ -1371,13 +1419,8 @@ # *.so: Apache2 modules, OCaml stublibs, Ruby modules # *.oct: Octave modules - for exe in $(find * -type f -name '*.dll' -o -name '*.exe' -o -name '*.so' -o -name '*.oct') + for exe in $(find * -type f -writable -a \( -name '*.dll' -o -name '*.exe' -o -name '*.so' -o -name '*.oct' \)) do - if [ ! -w ${exe} ] - then - continue - fi - # OCaml bytecode must not be stripped # this test generates false positives with the ocaml core and # compilers, but should otherwise be accurate @@ -1404,6 +1447,29 @@ done } +__prepuac() { + local exe exename; + + cd ${D}; + + echo "Preparing executables for UAC:"; + + for exe in $(find * -type f -executable -a \( -name '*instal*.exe' -o -name '*patch*.exe' -o -name '*setup*.exe' -o -name '*update*.exe' \)) + do + exename=${exe##*/}; + + # Mono assemblies may already include .manifest files. + if [ ! -e ${exe}.manifest ] + then + echo " ${exe}"; + sed -e "s|@PKGNAME@|${PN//.}|" \ + -e "s|@APPNAME@|${exename%.exe}|" \ + ${_privdatadir}/uac-manifest.in > ${exe}.manifest + chmod +x ${exe}.manifest + fi + done +} + __prep_symlinks() { local l l_src @@ -1443,12 +1504,13 @@ __prepvargames; __prep_empty_dirs; __prepstrip; + __prepuac; __prep_libtool_modules; } # protect functions readonly -f __prepdoc __prepetc __prepman __prepinfo __prepvargames __prep_empty_dirs \ - __prepstrip __prep_symlinks __prep_libtool_modules __src_postinst + __prepstrip __prepuac __prep_symlinks __prep_libtool_modules __src_postinst ################################################################################ Index: data/Makefile.am =================================================================== --- data/Makefile.am (revision 6446) +++ data/Makefile.am (working copy) @@ -1,4 +1,8 @@ -dist_pkgdata_DATA = cygport.nanorc mirrors sample.cygport +dist_pkgdata_DATA = \ + cygport.nanorc \ + mirrors \ + sample.cygport \ + uac-manifest.in bashcompletiondir = /etc/bash_completion.d dist_bashcompletion_DATA = cygport-bash-completion Index: data/uac-manifest.in =================================================================== --- data/uac-manifest.in (revision 0) +++ data/uac-manifest.in (revision 0) @@ -0,0 +1,16 @@ + + + + + + + + + + + + + --------------090404020901070308070808 Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --------------090404020901070308070808--