From owner-freebsd-questions@freebsd.org Fri Aug 5 19:19:21 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4087DBB00E4 for ; Fri, 5 Aug 2016 19:19:21 +0000 (UTC) (envelope-from andrewjameswood@ymail.com) Received: from nm39-vm9.bullet.mail.ir2.yahoo.com (nm39-vm9.bullet.mail.ir2.yahoo.com [212.82.97.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C79A10CD for ; Fri, 5 Aug 2016 19:19:19 +0000 (UTC) (envelope-from andrewjameswood@ymail.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1470424610; bh=sBqQEcyWI0/yDPlw8Rcvzfh/Z9bRPKditdwHIbZPng0=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=UcgX6li/RVFHIXODQAyk5NLzzTkI4U8xIek5uXmVx9yzxnw7nOZ3M7VI4s8y598cb8J12O0nj8FYKzTCsL+eFs1KLMZXrGIo+3hjkxPwxb55p/SwpdNv9uAkKq+Kc69nxD3k+8+LdyXVl53xAvNFfDuqHFsrahBYgNxKstYaph7uoReq+HZpuROMvPu9oj3XGnHkcIe1UF/GrlgRUUh688BqDGQDjtDasDahSS9dVpqN62wytlH3ioFkqZpKqpoptry0bVosvOWytvdUM2fZB4/gtbVA14iVxoLzTHeKD5p3c/nvyVlzyE+NQDfmzJAHEcok6GJC12pmLRW5phbDpg== Received: from [212.82.98.126] by nm39.bullet.mail.ir2.yahoo.com with NNFMP; 05 Aug 2016 19:16:50 -0000 Received: from [46.228.39.91] by tm19.bullet.mail.ir2.yahoo.com with NNFMP; 05 Aug 2016 19:16:50 -0000 Received: from [127.0.0.1] by smtp128.mail.ir2.yahoo.com with NNFMP; 05 Aug 2016 19:16:50 -0000 X-Yahoo-Newman-Id: 958250.83760.bm@smtp128.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: dCq7X2sVM1kpPvpTe0bMAhpLI5KnoUFLAe__OXFcHtqxTh0 ZruWCWKb84JXcp96cBByHKGHxS45AjhatuAUCQ2ll4.YuTFiibYGDdigojbk 35iF39M0mt6UAfUw_VqqI4LMEPYGDFXWt1ysuyz_wa2XX_eb7Qwngvaa8Cky r6VdYLiDNWxj0FaJCEW6TvVcEpcQLgCUL0k24.cn..jNliSWWmWqh34S1XAo CEUr.nT_eOEgXmAQIMhfBikuHe_V4JmkBDdfQ7NYji4otUxrEngevGHraRO8 q3HJN9O2bbatD3Q9VfFOzRhC1FEZ6Mx9O3C4R3fTjFsYuvLiAEI6xLa0_vZN rorUHbh55pslxyjYE9DnrlMovVP4jlxfsCKLOJXE.OtWR0Kmw9nTO.oles_4 Qt8iWF7pFoKWhPf3JRDflzG2fxH8.fJckHbcwp8IMwTzziC6FS0q47e7IFnX TzUGLuKVGvS8eJNF6FME8W2z4JfN_AN09Xq8yRNzAYLWegFZo1c6gTSxpFkV XPabxHjauOMEwmg7jTzdWxBBXfK.Ht6.X3_wLTyRkzA0hg0C5Mz6gO7KWywk E2YADhJbHkbJHgAtDeA-- X-Yahoo-SMTP: lyMebeuswBAKXlSCZ4_eELrg31ykJBp.BALgvdbr.jksrQi8VqI- Subject: Re: Creating a pkg To: freebsd-questions@freebsd.org References: <981a28ca-09a4-995b-fee3-55d4a6dc5fb3@ymail.com> <889eda92-91ce-ecd0-3426-97b688093102@ymail.com> <4e9ba369-ea20-03d4-f549-17a5bd73e66e@FreeBSD.org> From: Andrew Wood Message-ID: <2532ed27-902f-67ad-8dc2-0a1da9874f79@ymail.com> Date: Fri, 5 Aug 2016 20:16:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2016 19:19:21 -0000 On 29/07/16 18:33, Andrew Wood via freebsd-questions wrote: > On 28/07/16 22:14, Matthew Seaman wrote: > >> Note that >> pkg(8) will automatically calculate the file checksums so you can >> leave those bits out of >> your manifest > What is the syntax for doing this, what would I put in the files {} > section where the hash would normally go? > > OK after trial and error not helped by the fact that different docs seems to have different syntax, Ive managed to put together a pkg which will install all the files at the desired location and remove them again when the pkg is uninstalled. I can also set the file permissions but not the owner or group owner, which Im doing like this: files: { /path/to/file: {uname: 'username', gname: 'groupname',perm: 644}; } I suspect theres nothing wrong with that, the problem is simply that it isnt creating the user or group in the first place. Am I right in assuming that is the purpose of users: ["username"]; groups: ["groupname", "groupname2"]; If so why is it not making the necessary entries in the /etc/passwd or /etc/group files? Thanks Andrew