Dynamic Window Manager install with patch(es)

2011-09-21 Thread Andy Zammy
Hi all,

First time poster to the lists!

Using dwm, loving the minimalism and it's forcing me to learn stuff the hard
way which is all good. But I can't seem to figure out how to apply a patch
to it.

According to the instructions listed here: http://dwm.suckless.org/patches/ I
figured I'm to use the "tarball method" as that's how ports fetches dwm. I
tried applying the method to /usr/ports/x11-wm/dwm/work/dwm-5.9 but it
didn't work (malformed patch).

I've used ubuntu for about a year but for all intents and purposes I'm still
a beginner with UNIX-like, and I've never used patch or diff before. But, I
remembered that these are ports and wonder if these patches would work on
FreeBSD source? Would I have to apply the patch to the tarball while it's in
distfiles before it gets 'ported' to freebsd? Or am I talking crazy?

Any help would be appreciated.

andy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Dynamic Window Manager install with patch(es)

2011-09-22 Thread Andy Zammy
I see, then in that case I don't think I'm doing anything wrong. Here is the
output of make:

# make
You can build dwm with your own config.h using the DWM_CONF knob:
make DWM_CONF=/path/to/dwm/config.h install clean
Note: Pre-5.6 config.h-files no longer work.
===>  License MIT accepted by the user
===>  Found saved configuration for dwm-5.9
===>  Extracting for dwm-5.9
=> SHA256 Checksum OK for dwm-5.9.tar.gz.
===>  Patching for dwm-5.9
===>  Applying FreeBSD patches for dwm-5.9
File to patch: files/patch-defaultopacity
No file found--skip this patch? [n] n
File to patch: /usr/home/user/Downloads/dwm.defaultopacity.patch
patch:  malformed patch at line 9: @@ -52,6 +54,9 @@
=> Patch patch-defaultopacity failed to apply cleanly.
=> Patch(es) patch-Makefile patch-config.mk applied cleanly.
*** Error code 1

Stop in /usr/ports/x11-wm/dwm.
*** Error code 1

Stop in /usr/ports/x11-wm/dwm.
--

Like I say I don't know how patch or diff work but it's strange how it needs
pointing to the patch again?

On 22 September 2011 08:05, Matthew Seaman
wrote:

> On 22/09/2011 00:51, Andy Zammy wrote:
> > According to the instructions listed here:
> http://dwm.suckless.org/patches/ I
> > figured I'm to use the "tarball method" as that's how ports fetches dwm.
> I
> > tried applying the method to /usr/ports/x11-wm/dwm/work/dwm-5.9 but it
> > didn't work (malformed patch).
>
> This is pretty much the correct approach.  Although to do it in the best
> ports fashion, you'ld save the patch file to
> ${PORTSDIR}/x11-wm/dwm/files/patch-something-or-other and then the ports
> would patch the sources for you automatically any time you rebuilt the
> port.  Don't worry about that for the time being though.  Just getting
> the patch to apply by hand is a good first step.
>
> It's quite normal for ports to apply patches this way -- the dwm port
> already has patches for Makefile and config.mk.  If your patch attempts
> to patch those same files it could fail.  However the error message
> would be 'patch failed to apply' which is obviously not what you're
> getting.
>
> The big question is why the patch you already have appears to be
> malformed.  How did you obtain it?  Can you repeat the process paying
> attention to any error messages and so forth and see if that works better?
>
> > I've used ubuntu for about a year but for all intents and purposes I'm
> still
> > a beginner with UNIX-like, and I've never used patch or diff before. But,
> I
> > remembered that these are ports and wonder if these patches would work on
> > FreeBSD source? Would I have to apply the patch to the tarball while it's
> in
> > distfiles before it gets 'ported' to freebsd? Or am I talking crazy?
>
> No -- modifying the tarball is possible, but as the effect is exactly
> the same as what you tried above and as it will then fail the checksum
> tests, well, it's not worth the bother.
>
> patch and diff at this level work in exactly the same way on just about
> any unix (eg FreeBSD) or unix-alike (Linux including Ubuntu) and
> probably a few weird OSes you've never heard of.  Like I said, applying
> patches is a common action the ports will do for you.
>
>Cheers,
>
>Matthew
>
> --
> Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
>  Flat 3
> PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
> JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


failed to create gmirror with the handbook instructions

2013-10-07 Thread Andy Zammy
Hi,

I used the second section of the handbook (20.4) to create a gmirror. In my
particular setup I had a 1GB /, 6GB swap, 1GB /tmp and the rest of the 1TB
drive was left for /usr

I had to deviate from the handbook when it came to running the dump +
restore commands, as the dump failed due to an issue with the journalling.
To get around this problem, I dropped into single user mode, so I could
remount root as read-only. The dump commands then worked. It specified in
the handbook to restart the machine, and boot from ada1.

It was at this point that I noticed something wasn't quite right. There was
a spew of 'not found/no such file or directory' messages. These were all
trying to reference libs and binaries that live in /usr.

I boot into single user mode, and upon checking the other partitions, I
notice that /tmp and /usr are empty, apart from a .snap file, and the
restoresymtable file.

Please could someone help me troubleshoot this problem? Let me know if you
need any more info, and I'll post it up asap.

Kind Regards

Andy
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: failed to create gmirror with the handbook instructions

2013-10-08 Thread Andy Zammy
Thanks very much. Please could I make a suggestion that this be included in
the handbook page?
On 8 Oct 2013 01:31, "Warren Block"  wrote:

> On Tue, 8 Oct 2013, Andy Zammy wrote:
>
>  Hi,
>>
>> I used the second section of the handbook (20.4) to create a gmirror. In
>> my
>> particular setup I had a 1GB /, 6GB swap, 1GB /tmp and the rest of the 1TB
>> drive was left for /usr
>>
>> I had to deviate from the handbook when it came to running the dump +
>> restore commands, as the dump failed due to an issue with the journalling.
>> To get around this problem, I dropped into single user mode, so I could
>> remount root as read-only. The dump commands then worked. It specified in
>> the handbook to restart the machine, and boot from ada1.
>>
>> It was at this point that I noticed something wasn't quite right. There
>> was
>> a spew of 'not found/no such file or directory' messages. These were all
>> trying to reference libs and binaries that live in /usr.
>>
>> I boot into single user mode, and upon checking the other partitions, I
>> notice that /tmp and /usr are empty, apart from a .snap file, and the
>> restoresymtable file.
>>
>> Please could someone help me troubleshoot this problem? Let me know if you
>> need any more info, and I'll post it up asap.
>>
>
> dump does not work reliably on filesystems with SUJ enabled.  Turn off SUJ
> on the filesystems to be dumped by booting in single-user mode and running
>   tunefs -j disable /dev/ada0whatever
>
> Do each filesystem, then use dump.
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: failed to create gmirror with the handbook instructions

2013-10-08 Thread Andy Zammy
This is actually trickier than it first looked. First I got into single
user mode by supplying 'shutdown now', but the tunefs commands all failed
with the following:
#tunefs -j disable /dev/ada0s1a
Clearing journal flags from inode 4
tunefs: Failed to write journal inode: Operation not permitted
tunefs: soft updates journalling cleared but soft updates still set.
tunefs: remove .sujournal to reclaim space
tunefs: /dev/ada0s1a: failed to write superblock

I tried the dump command on the off-chance, and it failed with the original
errors. Is there anything you can recommend?

I then noticed you specified to boot into single user more, so I restarted
the machine, with only ada0 attached. Because the handbook wants me to use
the mirror/gm0sX devices, I swapped my fstab file back to the original. The
boot loader now only seems to recognise the mirror/gm0 nodes, the original
ada0sX are gone (though ada0 still shows up). I'm not sure if it's
acceptable to do the dump by booting the 1st hard drive using the
mirror/gm0, and then dump to the 2nd hard drive by mounting what will be
ada1sX. Is this okay to do?


On 8 October 2013 01:31, Warren Block  wrote:

> On Tue, 8 Oct 2013, Andy Zammy wrote:
>
>  Hi,
>>
>> I used the second section of the handbook (20.4) to create a gmirror. In
>> my
>> particular setup I had a 1GB /, 6GB swap, 1GB /tmp and the rest of the 1TB
>> drive was left for /usr
>>
>> I had to deviate from the handbook when it came to running the dump +
>> restore commands, as the dump failed due to an issue with the journalling.
>> To get around this problem, I dropped into single user mode, so I could
>> remount root as read-only. The dump commands then worked. It specified in
>> the handbook to restart the machine, and boot from ada1.
>>
>> It was at this point that I noticed something wasn't quite right. There
>> was
>> a spew of 'not found/no such file or directory' messages. These were all
>> trying to reference libs and binaries that live in /usr.
>>
>> I boot into single user mode, and upon checking the other partitions, I
>> notice that /tmp and /usr are empty, apart from a .snap file, and the
>> restoresymtable file.
>>
>> Please could someone help me troubleshoot this problem? Let me know if you
>> need any more info, and I'll post it up asap.
>>
>
> dump does not work reliably on filesystems with SUJ enabled.  Turn off SUJ
> on the filesystems to be dumped by booting in single-user mode and running
>   tunefs -j disable /dev/ada0whatever
>
> Do each filesystem, then use dump.
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: failed to create gmirror with the handbook instructions

2013-10-08 Thread Andy Zammy
I
On 8 October 2013 01:31, Warren Block  wrote:

> On Tue, 8 Oct 2013, Andy Zammy wrote:
>
>  Hi,
>>
>> I used the second section of the handbook (20.4) to create a gmirror. In
>> my
>> particular setup I had a 1GB /, 6GB swap, 1GB /tmp and the rest of the 1TB
>> drive was left for /usr
>>
>> I had to deviate from the handbook when it came to running the dump +
>> restore commands, as the dump failed due to an issue with the journalling.
>> To get around this problem, I dropped into single user mode, so I could
>> remount root as read-only. The dump commands then worked. It specified in
>> the handbook to restart the machine, and boot from ada1.
>>
>> It was at this point that I noticed something wasn't quite right. There
>> was
>> a spew of 'not found/no such file or directory' messages. These were all
>> trying to reference libs and binaries that live in /usr.
>>
>> I boot into single user mode, and upon checking the other partitions, I
>> notice that /tmp and /usr are empty, apart from a .snap file, and the
>> restoresymtable file.
>>
>> Please could someone help me troubleshoot this problem? Let me know if you
>> need any more info, and I'll post it up asap.
>>
>
> dump does not work reliably on filesystems with SUJ enabled.  Turn off SUJ
> on the filesystems to be dumped by booting in single-user mode and running
>   tunefs -j disable /dev/ada0whatever
>
> Do each filesystem, then use dump.
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: failed to create gmirror with the handbook instructions

2013-10-08 Thread Andy Zammy
# gpart show ada0s1
gpart: No such geom: ada0s1

By the way, this is after a restart of the machine.

There's nothing to back up, I'm installing a fresh os, so I just install on
one drive, plug the other in, and start following the handbook instructions
for this method. So the only thing in loader.conf is geom_mirror_load="YES".

I'll rephrase the question: given that the handbook originally wanted me to
dump from ada0s1 to the mounted mirror/gm0s1 (which was ada1 at the time),
and I cannot do this, would it be enough to dump from mirror/gm0s1 (which
is what ada0 is now mounted as), to ada1s1 (even though this *should* be
the other way around, it's equivalent as far as i can see, isn't it?)?


On 8 October 2013 22:59, Warren Block  wrote:

> On Tue, 8 Oct 2013, Andy Zammy wrote:
>
>  This is actually trickier than it first looked. First I got into single
>> user mode by supplying 'shutdown now', but the tunefs commands all failed
>> with the following:
>> #tunefs -j disable /dev/ada0s1a
>> Clearing journal flags from inode 4
>> tunefs: Failed to write journal inode: Operation not permitted
>> tunefs: soft updates journalling cleared but soft updates still set.
>> tunefs: remove .sujournal to reclaim space
>> tunefs: /dev/ada0s1a: failed to write superblock
>>
>> I tried the dump command on the off-chance, and it failed with the
>> original errors. Is there anything you can recommend?
>>
>> I then noticed you specified to boot into single user more, so I
>> restarted the machine, with only ada0 attached. Because the handbook wants
>> me to use the mirror/gm0sX devices, I swapped
>> my fstab file back to the original. The boot loader now only seems to
>> recognise the mirror/gm0 nodes, the original ada0sX are gone (though ada0
>> still shows up).
>>
>
> I don't know what would do that.  The device nodes on the original drive
> should be untouched until it is added back to the mirror.  What does
>   gpart show ada0s1
> show?  Did you make a backup of the original drive first?  Is there an
> entry for vfs.root.mountfrom in /boot/loader.conf?
>
>  I'm not sure if it's acceptable to do the dump by booting the 1st hard
>> drive using the mirror/gm0, and then dump to the 2nd hard drive by mounting
>> what will be ada1sX. Is this okay to do?
>>
>
> Sorry, I don't quite understand the question.  The mirror will not be
> usable until a good copy of the original drive is made to it.
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: failed to create gmirror with the handbook instructions

2013-10-08 Thread Andy Zammy
I tried creating the mirror before the install. As the drives are now
mirrored, the installer picked up on the face that there are two gm0 nodes
- one on each hard drive. I installed onto ada0's gm0 node.

After it reboots, the bootloader stops at the manual prompt. From what I
can see that's not dissapeared up the screen, it tried and failed to mount
from mirror/gm0s1a with error 19. I had to mount from ada0s1a in order for
the boot to get further, but as it's been installed to boot from gm0s1x, it
stops after it mounts /.

After having checked my partition setup many times at this point, I know
for a fact there's a rather large 500MB section free at the end of my hard
drives with this partition set up. Is there any reason I can't just install
as normal, do a 'gmirror label gm0 ada0', and then do a 'gmirror insert gm0
ada1', before changing my fstab to use mirror/gm0? I can't see why dumping
and restoring is necessary, it's just manually doing what gmirror is there
for in the first place. Correct me if I'm wrong :)


On 9 October 2013 00:11, Warren Block  wrote:

> On Tue, 8 Oct 2013, Andy Zammy wrote:
>
>  # gpart show ada0s1
>> gpart: No such geom: ada0s1
>>
>> By the way, this is after a restart of the machine.
>>
>> There's nothing to back up, I'm installing a fresh os, so I just install
>> on one drive, plug the other in, and start following the handbook
>> instructions for this method. So the only
>> thing in loader.conf is geom_mirror_load="YES".
>>
>> I'll rephrase the question: given that the handbook originally wanted me
>> to dump from ada0s1 to the mounted mirror/gm0s1 (which was ada1 at the
>> time), and I cannot do this, would it be
>> enough to dump from mirror/gm0s1 (which is what ada0 is now mounted as),
>> to ada1s1 (even though this *should* be the other way around, it's
>> equivalent as far as i can see, isn't it?)?
>>
>
> There is not much point in dumping from the mirror to another drive. The
> dump/restore is how the single drive is copied to the mirror.
>
> On a fresh install, use the Shell mode of the installer to set up the
> mirror, then install directly to it.  There are some instructions on
> mountpoints in the bsdinstall man page.  This will avoid the lag of waiting
> for the second drive to sync.
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"