[PA-1163] augeas on Windows Created: 2015/07/31  Updated: 2019/05/02

Status: Open
Project: Puppet Agent
Component/s: Windows
Affects Version/s: None
Fix Version/s: None

Type: Epic Priority: Normal
Reporter: Michael Smith Assignee: Unassigned
Resolution: Unresolved Votes: 6
Labels: augeas, triaged, windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2015-10-07 at 3.36.24 PM.png    
Issue Links:
Epic Name: Augeas on Windows
Platform OS
Epic Status: To Do


An attempt to port the augeas library to Windows.

Instructions so far:

Notes: my environment is msys bash
Using mingw-w64 4.8.4 x86_64-win32-seh-rev0
Install mingw-get-setup.exe from https://sourceforge.net/projects/mingw/files/latest/download
Install basic msys package, plus msys-libxml2 dev
See http://www.mingw.org/wiki/getting_started for further setup (setup fstab for /mingw)
Setup build config: LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" CXXFLAGS="-I/usr/local/include" ACLOCAL_PATH=/usr/local/share/aclocal
Download and build/install pdcurses: http://ingar.satgnu.net/devenv/mingw32/local.html#pdcurses
Download and build/install readline: http://ingar.satgnu.net/devenv/mingw32/tools.html
Download and build/install zlib: http://ingar.satgnu.net/devenv/mingw32/local.html#zlib
Download and build/install libxml2: http://ingar.satgnu.net/devenv/mingw32/gtk.html#libxml2
Install pkg-config from http://ingar.satgnu.net/devenv/mingw32/local.html#pkgconfig and http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.26-1_win32.zip
Use UNIX line endings: git config --global core.autocrlf false (otherwise autogen fails with an error about AC_CONFIG_FILES)
git clone augeas && git submodule update --init
Update gnulib to 9c70545fde260c33694ba56cf8ddf8b8cfc45b71 (master as of 7/30/2015 at 10:42 AM PDT)
autogen.sh && make
TODO: Why isn't pkg.m4 being picked up? So far worked around it by re-running aclocal with -I /path/to/pkg.m4, and re-running configure. 
./src/try cli

Using gnuwin32 instead of compiling everything manually would probably work as well.

Comment by Rob Reynolds [ 2015/08/02 ]

I believe on my last attempt I was using gnuwin32 for all the compile tools.

Comment by Michael Smith [ 2015/08/02 ]

What shell did you use?

I ended up doing a bunch of unnecessary work because something about pkg-config wasn't setup right and it took me awhile to identify that as the problem. I agree gnuwin32 is probably easier, but it's not a complete set of instructions.

Comment by Rob Reynolds [ 2015/08/02 ]

What shell did you use?

Honestly I don't remember, I think I just used a regular cmd.exe shell after I put all of the gnuwin32 tools on the path. I installed https://chocolatey.org/packages/GnuWin (be warned, the package needs some help, things may need moved around and paths added once the package is installed) and then fixed up some of the items as they didn't want to work correctly out of the box. (autoconf and automake are ones I recall needing some adjustments).

Comment by Michael Smith [ 2015/10/07 ]

Note that the latest version of the branch rebased on Augeas, and the new csv.aug lens seems to fail parsing on Windows.

Comment by Michael Smith [ 2015/12/02 ]

Use MSYS2, it's way easier to get everything setup. But then it segfaults trying to run try cli.

Comment by Michael Smith [ 2016/06/01 ]

I believe the Windows puppet-agent builds may include most of the packages required by augeas, as part of the work to build Ruby. The next step would be investigating building Augeas as part of that project.

Comment by Adrien Thebo [ 2017/05/15 ]

Michael Smith does this ticket need to stay open or can we close it?

Comment by Michael Smith [ 2017/05/15 ]

It'd still be cool to do. However, it's probably not relevant in the PUP project. I'm ok closing it; it'll remain as a record of work done so far.

Comment by Michael Smith [ 2017/05/15 ]

Actually, I think this is still a valid feature request. If it needs a place to live, PA might be a more appropriate project.

Comment by Chris Matteson [ 2017/05/22 ]

I definitely thing this a valid request. Since we bundle our own ruby, it seems very solvable as part of the puppet agent.

Comment by Nick Maludy [ 2019/02/20 ]

+1 for this.


Have an application running on Windows + IIS that uses XML as its config language.


Would be very helpful to use the Augeas XML lens to edit this config file.

Generated at Thu Jun 27 05:22:37 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.